interchange: tests: counter: emit carries for xc7
Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
This commit is contained in:
parent
104536b7aa
commit
490ca794c5
@ -1,13 +1,15 @@
|
|||||||
module top(input clk, input rst, output [7:4] io_led);
|
module top(input clk, input rst, output [7:4] io_led);
|
||||||
|
|
||||||
reg [31:0] counter = 32'b0;
|
localparam SIZE = 32;
|
||||||
|
|
||||||
assign io_led = counter >> 22;
|
reg [SIZE-1:0] counter = SIZE'b0;
|
||||||
|
|
||||||
|
assign io_led = {counter[SIZE-1], counter[25:23]};
|
||||||
|
|
||||||
always @(posedge clk)
|
always @(posedge clk)
|
||||||
begin
|
begin
|
||||||
if(rst)
|
if(rst)
|
||||||
counter <= 32'b0;
|
counter <= SIZE'b0;
|
||||||
else
|
else
|
||||||
counter <= counter + 1;
|
counter <= counter + 1;
|
||||||
end
|
end
|
||||||
|
@ -2,7 +2,7 @@ yosys -import
|
|||||||
|
|
||||||
read_verilog $::env(SOURCES)
|
read_verilog $::env(SOURCES)
|
||||||
|
|
||||||
synth_xilinx -nolutram -nowidelut -nosrl -nocarry -nodsp
|
synth_xilinx -nolutram -nowidelut -nosrl -nodsp
|
||||||
techmap -map $::env(TECHMAP)
|
techmap -map $::env(TECHMAP)
|
||||||
|
|
||||||
# opt_expr -undriven makes sure all nets are driven, if only by the $undef
|
# opt_expr -undriven makes sure all nets are driven, if only by the $undef
|
||||||
|
Loading…
Reference in New Issue
Block a user