-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
91 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
00004137 | ||
FFC10113 | ||
00000193 | ||
00100293 | ||
30429073 | ||
04400293 | ||
00028293 | ||
30529073 | ||
000022B7 | ||
FFC28293 | ||
34029073 | ||
00100293 | ||
0051A023 | ||
00000313 | ||
00000393 | ||
00000073 | ||
00000063 | ||
340292F3 | ||
0062A023 | ||
0072A223 | ||
34202373 | ||
100003B7 | ||
01038393 | ||
00731A63 | ||
0001A383 | ||
00338393 | ||
0071A023 | ||
0200006F | ||
00200393 | ||
00731C63 | ||
34102373 | ||
00032383 | ||
00430313 | ||
34131073 | ||
0040006F | ||
0002A303 | ||
0042A383 | ||
340292F3 | ||
30200073 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
////////////////////////////////////////////////////////////////////////////////// | ||
// Company: MIET | ||
// Engineer: Andrei Solodovnikov | ||
// | ||
// Create Date: | ||
// Design Name: | ||
// Module Name: tb_riscv_unit | ||
// Project Name: RISCV_practicum | ||
// Target Devices: Nexys A7-100T | ||
// Tool Versions: | ||
// Description: tb for riscv unit with irq support | ||
// | ||
// Dependencies: | ||
// | ||
// Revision: | ||
// Revision 0.01 - File Created | ||
// Additional Comments: | ||
// | ||
////////////////////////////////////////////////////////////////////////////////// | ||
|
||
module tb_irq_unit(); | ||
|
||
reg clk; | ||
reg rst; | ||
|
||
riscv_unit unit( | ||
.clk_i(clk), | ||
.rst_i(rst) | ||
); | ||
|
||
initial clk = 0; | ||
always #10 clk = ~clk; | ||
initial begin | ||
$display( "\nStart test: \n\n==========================\nCLICK THE BUTTON 'Run All'\n==========================\n"); $stop(); | ||
unit.irq_req = 0; | ||
rst = 1; | ||
#20; | ||
rst = 0; | ||
repeat(20)@(posedge clk); | ||
unit.irq_req = 1; | ||
while(unit.irq_ret == 0) begin | ||
@(posedge clk); | ||
end | ||
unit.irq_req = 0; | ||
$display("\n The test is over \n See the internal signals of the module on the waveform \n"); | ||
$finish; | ||
end | ||
|
||
endmodule |