entity tb_thingy is end tb_thingy; architecture tb of tb_thingy is component thingy is port ( x_x : in bit; y_y : out bit ); end component; signal stimuli : bit; signal response : bit; begin dut : thingy port map ( x-x => stimuli, -- <== spelling error y_y => response ); end tb; type='application/atom+xml'/>
aboutsummaryrefslogtreecommitdiffstats
path: root/techlibs/xilinx/example_mojo_counter/example.v
blob: cb98cc1b27dd1ca4b4651527bd238bd21d8069d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module top(clk, ctrl, led_7, led_6, led_5, led_4, led_3, led_2, led_1, led_0);

input clk, ctrl;
output led_7, led_6, led_5, led_4;
output led_3, led_2, led_1, led_0;

reg [31:0] counter;

always @(posedge clk)
	counter <= counter + (ctrl ? 4 : 1);

assign {led_7, led_6, led_5, led_4, led_3, led_2, led_1, led_0} = counter >> 24;

endmodule