Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exn #71

Open
wants to merge 44 commits into
base: main
Choose a base branch
from
Open

Exn #71

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
c31c456
basics
Mar 13, 2022
263fed8
commit
Mar 14, 2022
c11d649
tmp
Mar 17, 2022
5269a3e
add exceptions task description
Mar 17, 2022
28f0c60
Update exceptions.md
dz333 Mar 17, 2022
30953ef
start exn typechecking. currently working on typeinference
Mar 28, 2022
86409a8
type inference
Apr 4, 2022
b0ca5cd
type inference
Apr 4, 2022
d3d7bfc
add typechecking based on the rules we discussed
yy665 Apr 19, 2022
7840a73
fix some ast
yy665 Apr 19, 2022
4f5a9a5
type checking working for exceptions? only positively
May 2, 2022
8c8f56b
untested, but done?
May 5, 2022
c60610e
added useful code for generating abort calls
dz333 May 5, 2022
2431f4d
added a simple abort-able lock
dz333 May 5, 2022
64a4d86
testing for exceptions
May 9, 2022
efe940a
Merge branch 'exn' of github.com:apl-cornell/PDL into exn
May 9, 2022
f13e86a
yeet old code
May 9, 2022
1a1f94c
exn_translation
yy665 Jun 22, 2022
9fcf978
add testcase
yy665 Jun 22, 2022
bd4d886
updated this example to reflect a bug - BaseTypeChecker should check …
dz333 Jun 22, 2022
16c8893
updated example to do a write
dz333 Jun 22, 2022
6f1b359
fixed some bugs in pretty printer, and made port checker pass run on …
dz333 Jun 23, 2022
f465d0d
partially resolved comments, enables exn_args and kill_rules
yy665 Jul 7, 2022
730997e
debugs and change kill rule impl
yy665 Jul 12, 2022
96a465b
added a spectable.clear() function that resets it to initial state
dz333 Jul 12, 2022
dc84843
added a clear method for our async mems that clears their request queues
dz333 Jul 12, 2022
68245bf
finish problem with old ModLock instantiations
dz333 Jul 12, 2022
7626eeb
tests passed
yy665 Jul 30, 2022
60c58bb
tests and fixes
yy665 Nov 29, 2022
7ac58af
Merge pull request #72 from yy665/exn
yy665 Nov 29, 2022
7fdfe43
resolve all comments and fix bugs, add ehr
yy665 Mar 1, 2023
d562687
Merge pull request #74 from yy665/exn
yy665 Mar 1, 2023
d9e204c
fix tests
yy665 Mar 1, 2023
3ea3e34
Merge pull request #75 from yy665/exn
yy665 Mar 1, 2023
b386fb4
rewrite impl with stgclear
yy665 Apr 6, 2023
635d92d
fix sq
yy665 Apr 6, 2023
24e6edd
fix
yy665 Apr 6, 2023
15231cd
Merge pull request #77 from yy665/exn
yy665 Apr 6, 2023
7935064
Update scala.yml
dz333 Apr 7, 2023
737bc6d
further exn change
yy665 Aug 8, 2023
ef2f70f
fix problem wrt iverilog version
yy665 Oct 11, 2023
5176c08
some fixes and testcases
yy665 Oct 16, 2023
6cc3a76
fix chkp + some ad hoc stuff
yy665 Oct 25, 2023
1b0f426
Merge pull request #78 from yy665/exn
yy665 Oct 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build:

runs-on: ubuntu-18.04
runs-on: ubuntu-22.04

steps:
- name: Set up JDK 1.8
Expand Down Expand Up @@ -37,9 +37,9 @@ jobs:
- name: Install BSV
id: install-bsv
run: |
wget https://github.com/B-Lang-org/bsc/releases/download/2021.07/bsc-2021.07-ubuntu-18.04.tar.gz
tar -xvf bsc-2021.07-ubuntu-18.04.tar.gz
mv bsc-2021.07-ubuntu-18.04 bsc
wget https://github.com/B-Lang-org/bsc/releases/download/2023.01/bsc-2023.01-ubuntu-22.04.tar.gz
tar -xvf bsc-2023.01-ubuntu-22.04.tar.gz
mv bsc-2023.01-ubuntu-22.04 bsc
- name: Build Libs
env:
BLUESPECDIR: ${{github.workspace}}/bsc
Expand Down
4 changes: 2 additions & 2 deletions bin/runbsc
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ case "$CMD" in
#Run simulation in Bluesim
"$BSC" $ARGS -sim $BPATH "$TOP".bsv
"$BSC" $ARGS $BPATH -sim -o "$TB".bexe -e "$TB" "$TB".ba
timeout "$TOUT"s ./"$TB".bexe | grep -v "WARNING" > "$SIMOUT"
timeout "$TOUT"s ./"$TB".bexe | grep -v "WARNING" | grep -v "\$finish" > "$SIMOUT"
;;
"s")
#Run simulation in Verilog
"$BSC" $ARGS $BPATH $VPATH $VSIM -vdir $VDIR -simdir $SDIR -u "$TOP".bsv
"$BSC" $ARGS $VPATH $VSIM -verilog -vdir $VDIR -simdir $SDIR -o "$TB".bexe -e "$TB" "$VDIR"/"$TB".v
timeout "$TOUT"s ./"$TB".bexe | grep -v "WARNING" > "$SIMOUT"
timeout "$TOUT"s ./"$TB".bexe | grep -v "WARNING" | grep -v "\$finish" > "$SIMOUT"
;;
"c")
rm -f *.bi *.bo *.ba
Expand Down
1 change: 1 addition & 0 deletions bscRuntime/libs/BypassRF.v
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
Expand Down
1 change: 1 addition & 0 deletions bscRuntime/libs/Ehr.bsv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Ehr.bsv

// Copyright (c) 2017 Massachusetts Institute of Technology
//
Expand Down
1 change: 1 addition & 0 deletions bscRuntime/libs/Memories.bsv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Memories.bsv
package Memories;

import GetPut :: *;
Expand Down
1 change: 1 addition & 0 deletions bscRuntime/libs/Named.bsv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Named.bsv
package Named;

import Memories :: *;
Expand Down
1 change: 1 addition & 0 deletions bscRuntime/libs/NamedEhr.bsv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// NamedEhr.bsv
package Named;

import RegFile :: *;
Expand Down
5 changes: 3 additions & 2 deletions bscRuntime/libs/PrioFifo.bsv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// PrioFifo.bsv
package PrioFifo;

import FIFOF :: *;
Expand All @@ -11,7 +12,7 @@ module mkNBFIFOF(FIFOF#(dtyp)) provisos (Bits#(dtyp, szdtyp));
FIFOF#(dtyp) f <- mkFIFOF();
//allow multiple writes in the same cycle
RWire#(dtyp) enq_data <- mkRWireSBR();

(*fire_when_enabled*)
rule doEnq (enq_data.wget() matches tagged Valid.d);
f.enq(d);
Expand All @@ -36,7 +37,7 @@ module mkNBFIFOF(FIFOF#(dtyp)) provisos (Bits#(dtyp, szdtyp));
method Bool notEmpty();
return f.notEmpty();
endmethod

method Action clear();
f.clear();
endmethod
Expand Down
1 change: 1 addition & 0 deletions bscRuntime/libs/Speculation.bsv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Speculation.bsv
package Speculation;

import Vector :: *;
Expand Down
1 change: 1 addition & 0 deletions bscRuntime/libs/nametb.bsv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// nametb.bsv
import Named::*;
import FIFO::*;

Expand Down
1 change: 1 addition & 0 deletions bscRuntime/libs/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.6.2
1 change: 1 addition & 0 deletions bscRuntime/libs/tb.bsv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// tb.bsv
import Memories :: *;
import Connectable :: *;

Expand Down
1 change: 1 addition & 0 deletions bscRuntime/memories/Ehr.bsv
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Ehr.bsv

// Copyright (c) 2017 Massachusetts Institute of Technology
//
Expand Down
35 changes: 35 additions & 0 deletions bscRuntime/memories/Interrupt.bsv
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
Loading
Loading