Created
April 7, 2019 13:28
-
-
Save axayjha/4e3fdba295c860bc7018267371eb421a 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
module alu_tb; | |
reg[3:0]a; | |
reg[3:0]b; | |
reg[2:0]s; | |
wire[7:0]y; | |
alu a1(a,b,s,y); | |
initial begin | |
if (! $value$plusargs("a=%d", a)) begin | |
$display("ERROR: please specify +a=<value> to start."); | |
$finish; | |
end | |
if (! $value$plusargs("b=%d", b)) begin | |
$display("ERROR: please specify +b=<value> to start."); | |
$finish; | |
end | |
if (! $value$plusargs("s=%d", s)) begin | |
$display("ERROR: please specify +s=<value> to start."); | |
$finish; | |
end | |
wait (y) $display("y=%d", y); | |
$finish; | |
end // initial begin | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment