Created
February 4, 2016 03:51
-
-
Save brianhill11/399213bbe843c54085f1 to your computer and use it in GitHub Desktop.
This file contains 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 read_file_test_top(); | |
parameter NUM_TESTS = 10000; | |
parameter NUM_COLS = 3; | |
parameter MEM_SIZE = NUM_TESTS*NUM_COLS; | |
reg [31:0] mem [MEM_SIZE]; | |
int i; | |
initial begin | |
$readmemh("/home/b/quartus_test_data.hex", mem); | |
for (i = 0; i < MEM_SIZE; i=i+NUM_COLS) begin | |
assert( mem[i] * mem[i+1] == mem[i+2] ); | |
end | |
$display("Finished all tests.. No errors"); | |
end | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment