-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change: testbench runs now randomly external IRQ. Add also software IRQ
- Loading branch information
Showing
10 changed files
with
463 additions
and
368 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
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,40 @@ | ||
// distributed under the mit license | ||
// https://opensource.org/licenses/mit-license.php | ||
|
||
`timescale 1 ns / 1 ps | ||
`default_nettype none | ||
|
||
/* | ||
* Used to transform a signal like an interrupt which spans over several | ||
* clock cycles into a single pulse. | ||
*/ | ||
module friscv_pulser | ||
|
||
( | ||
input wire aclk, | ||
input wire aresetn, | ||
input wire srst, | ||
input wire intp, | ||
output logic pulse | ||
); | ||
|
||
logic intp_reg; | ||
|
||
always @ (posedge aclk or negedge aresetn) begin | ||
if (!aresetn) begin | ||
intp_reg <= 1'b0; | ||
pulse <= 1'b0; | ||
end else if (srst) begin | ||
intp_reg <= 1'b0; | ||
pulse <= 1'b0; | ||
end else begin | ||
intp_reg <= intp; | ||
pulse <= intp & !intp_reg; | ||
end | ||
end | ||
|
||
|
||
endmodule | ||
|
||
`resetall | ||
|
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
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
Oops, something went wrong.