Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameters in blocks #98

Closed
Jesus89 opened this issue Nov 21, 2016 · 1 comment
Closed

Parameters in blocks #98

Jesus89 opened this issue Nov 21, 2016 · 1 comment
Milestone

Comments

@Jesus89
Copy link
Member

Jesus89 commented Nov 21, 2016

The idea is to generate graphic blocks with upper pins to connect "Constant" blocks

For example,

  1. Add a code block with parameters "N,B"

  2. Connect two constant blocks with values 22 and 0 to the code block N and B connections.

  3. Export the project as a block

Then all the code blocks are parsed and a "parameters" list generated and included in the block.iceb file.


"parameters": [
  {
    "name": "N",
    "value: "22",
    "default": "22"
  },
  {
    "name": "B",
    "value: "0",
    "default": "0"
  }
] 
  1. Import the block.iceb file in a new project

The block appears with the upper pins "N,B".

  1. Edit the parameters.

Add and connect two Constant blocks N and B and write the values 23, 1.

  1. Save the project

These new values are updated in the project.ice file ("parameters" list).

  1. Build the project

The verilog compiler adds the parameters into the corresponding modules.

modtype #(
     .N(23),
     .B(1)) modname (...)
@Jesus89 Jesus89 added this to the 0.2.4 milestone Nov 22, 2016
@Jesus89
Copy link
Member Author

Jesus89 commented Dec 8, 2016

Done: 5300804

@Jesus89 Jesus89 closed this as completed Dec 8, 2016
@Jesus89 Jesus89 modified the milestones: 0.3.0, 0.2.4 Dec 15, 2016
umarcor pushed a commit to juanmard/icestudio that referenced this issue Jul 27, 2021
Add install --version X. Detect board type on upload.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant