Skip to content

Commit

Permalink
Test VHDL example
Browse files Browse the repository at this point in the history
  • Loading branch information
schoeberl committed Sep 18, 2023
1 parent 395399e commit 7bec7e7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ all: test gencode fig book genslides
test:
sbt test

vhdl:
make -C src/main/vhdl

gencode:
-mkdir code
sbt -Dsbt.main.class=sbt.ScriptMain scripts/gencode.scala
Expand Down Expand Up @@ -44,12 +47,6 @@ clean:
rm -rf target
rm -rf generated

chisel:
sbt "runMain Snippets"
sbt "runMain Counter"
sbt "test:runMain RegisterTester"
sbt "test:runMain LogicTester"

# test only one
flasher:
sbt "testOnly FlasherSpec"
Expand Down
7 changes: 7 additions & 0 deletions src/main/vhdl/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# Run VHDL tests

all:
ghdl -a basic.vhdl
ghdl -e adder_tb
ghdl -r adder_tb
5 changes: 1 addition & 4 deletions src/main/vhdl/basic.vhdl
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ begin
wait for 10 ns;
assert sum = "11111110" report "255 + 255 = 510" severity note;

a <= "11111111";
b <= "11111111";
wait for 10 ns;
assert sum = "11111111" report "255 + 255 = 510" severity note;
wait;
end process;
end architecture;

0 comments on commit 7bec7e7

Please sign in to comment.