-
Notifications
You must be signed in to change notification settings - Fork 2
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
263 changed files
with
1,172 additions
and
178 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// BypassRF.v | ||
`ifdef BSV_ASSIGNMENT_DELAY | ||
`else | ||
`define BSV_ASSIGNMENT_DELAY | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Ehr.bsv | ||
|
||
// Copyright (c) 2017 Massachusetts Institute of Technology | ||
// | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Memories.bsv | ||
package Memories; | ||
|
||
import GetPut :: *; | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Named.bsv | ||
package Named; | ||
|
||
import Memories :: *; | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// NamedEhr.bsv | ||
package Named; | ||
|
||
import RegFile :: *; | ||
|
Empty file.
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// PrioFifo.bsv | ||
package PrioFifo; | ||
|
||
import FIFOF :: *; | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Speculation.bsv | ||
package Speculation; | ||
|
||
import Vector :: *; | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// nametb.bsv | ||
import Named::*; | ||
import FIFO::*; | ||
|
||
|
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 @@ | ||
sbt.version=1.6.2 |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// tb.bsv | ||
import Memories :: *; | ||
import Connectable :: *; | ||
|
||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Ehr.bsv | ||
|
||
// Copyright (c) 2017 Massachusetts Institute of Technology | ||
// | ||
|
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,35 @@ | ||
package Interrupt; | ||
|
||
import FIFOF :: *; | ||
import Ehr :: *; | ||
|
||
interface TimingInterruptController#(numeric type addr); | ||
method ActionValue#(Bool) req(Int#(addr) a); | ||
method Action ack(Int#(addr) a); | ||
endinterface | ||
|
||
module mkTimingInterruptController(TimingInterruptController#(addr) _unused_); | ||
|
||
Reg#(Bool) status <- mkReg(False); | ||
Reg#(UInt#(10)) timer <- mkReg(0); | ||
Wire#(Int#(addr)) getAck <- mkWire(); | ||
|
||
// rule to update timer and set status to True every 1000 cycle | ||
rule updateTimer; | ||
timer <= timer + 1; | ||
if (timer == 999) begin | ||
timer <= 0; | ||
status <= True; | ||
end | ||
endrule | ||
|
||
method ActionValue#(Bool) req(Int#(addr) p); | ||
return status; | ||
endmethod | ||
|
||
method Action ack(Int#(addr) a); | ||
status <= False; | ||
endmethod | ||
endmodule | ||
|
||
endpackage |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Locks.bsv | ||
package Locks; | ||
|
||
import FIFOF :: *; | ||
|
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
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,58 @@ | ||
// StgFIFOs.bsv | ||
package StgFIFOs; | ||
|
||
import Ehr :: *; | ||
import ConfigReg :: *; | ||
import FIFOF :: *; | ||
|
||
export mkStgFIFOF; | ||
|
||
// Change to a CReg, two element Queue for per cycle. | ||
module mkStgFIFOF(FIFOF#(dtyp)) provisos (Bits#(dtyp, szdtyp)); | ||
|
||
FIFOF#(dtyp) f <- mkFIFOF(); | ||
//allow multiple writes in the same cycle | ||
RWire#(dtyp) enq_data <- mkRWireSBR(); | ||
RWire#(Bool) doClear <- mkRWireSBR(); | ||
|
||
//Make sure no enq could happen during clear (takes 2 cycles) | ||
|
||
(*conflict_free = "doEnqRule, doFIFOClearRule"*) | ||
(*fire_when_enabled, no_implicit_conditions*) | ||
rule doEnqRule (enq_data.wget() matches tagged Valid.d); | ||
f.enq(d); | ||
endrule | ||
|
||
(*fire_when_enabled, no_implicit_conditions*) | ||
rule doFIFOClearRule (doClear.wget() matches tagged Valid.d); | ||
f.clear(); | ||
endrule | ||
|
||
//only allow the LAST enq each cycle to work, drop the others | ||
method Action enq(dtyp a) if (f.notFull()); | ||
enq_data.wset(a); | ||
endmethod | ||
|
||
method Action deq(); | ||
f.deq(); | ||
endmethod | ||
|
||
method dtyp first(); | ||
return f.first(); | ||
endmethod | ||
|
||
method Bool notFull(); | ||
return f.notFull(); | ||
endmethod | ||
|
||
method Bool notEmpty(); | ||
return f.notEmpty(); | ||
endmethod | ||
|
||
method Action clear(); | ||
doClear.wset(True); | ||
endmethod | ||
|
||
endmodule | ||
|
||
endpackage |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// tb.bsv | ||
import Locks :: *; | ||
import Memories::*; | ||
import FIFO::*; | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// BHT.v | ||
`ifdef BSV_ASSIGNMENT_DELAY | ||
`else | ||
`define BSV_ASSIGNMENT_DELAY | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// BypassRF.v | ||
`ifdef BSV_ASSIGNMENT_DELAY | ||
`else | ||
`define BSV_ASSIGNMENT_DELAY | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// CheckpointBypassRF.v | ||
`ifdef BSV_ASSIGNMENT_DELAY | ||
`else | ||
`define BSV_ASSIGNMENT_DELAY | ||
|
Oops, something went wrong.