Last active
April 29, 2019 01:33
-
-
Save yuhei1horibe/a31c73e7bb888e86f5e0e7d4386ddec4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Add user logic here | |
| wire [4:0]out_from_adder; | |
| // Assign result | |
| always @( posedge S_AXI_ACLK) | |
| begin | |
| if (S_AXI_ARESETN == 1'b0 ) | |
| begin | |
| output_reg <= 32'h00000000; | |
| end | |
| else | |
| begin | |
| output_reg <= {27'h0, out_from_adder[4:0]}; | |
| end | |
| end | |
| // Wire adder | |
| adder4 ADDER_1( | |
| .a (input_a_reg[3:0]), | |
| .b (input_b_reg[3:0]), | |
| .y (out_from_adder[4:0])); | |
| assign LED_OUT[7:0] = { 3'h0, out_from_adder[4:0] }; | |
| // User logic ends |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment