Skip to content

Instantly share code, notes, and snippets.

@olofk
Last active January 26, 2019 21:14
Show Gist options
  • Select an option

  • Save olofk/bf6ffb9cd51b40d6ae3273f389df52ed to your computer and use it in GitHub Desktop.

Select an option

Save olofk/bf6ffb9cd51b40d6ae3273f389df52ed to your computer and use it in GitHub Desktop.
module t
(input a,
output [3:0] b);
genvar i;
//generate <== Should be optional for sv vlog2005
for (i=0 ; i<4 ; i=i+1) begin : genblock
assign b[i] = a;
end
//endgenerate <== Should be optional for sv vlog2005
endmodule
project_new qgen -overwrite
set_global_assignment -name FAMILY "Cyclone V"
set_global_assignment -name DEVICE 5CSXFC6D6F31C8ES
set_global_assignment -name TOP_LEVEL_ENTITY t
set_global_assignment -name SYSTEMVERILOG_FILE a.sv
quartus_tcl -t qgen.tcl
quartus_map qgen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment