From 1f7027f771d6c5e8b162532856fb7876e5c08d28 Mon Sep 17 00:00:00 2001 From: jl7719 Date: Wed, 16 Dec 2020 16:46:27 +0000 Subject: [PATCH 1/3] Update harvard test script to match spec main branch ignore bus implementation --- rtl/mips_cpu_bus.v | 16 ---------------- test/test_mips_cpu_harvard.sh | 6 +++--- 2 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 rtl/mips_cpu_bus.v diff --git a/rtl/mips_cpu_bus.v b/rtl/mips_cpu_bus.v deleted file mode 100644 index 111a7b3..0000000 --- a/rtl/mips_cpu_bus.v +++ /dev/null @@ -1,16 +0,0 @@ -module mips_cpu_bus( - /* Standard signals */ - input logic clk, - input logic reset, - output logic active, - output logic[31:0] register_v0, - - /* Avalon memory mapped bus controller (master) */ - output logic[31:0] address, - output logic write, - output logic read, - input logic waitrequest, - output logic[31:0] writedata, - output logic[3:0] byteenable, - input logic[31:0] readdata -); diff --git a/test/test_mips_cpu_harvard.sh b/test/test_mips_cpu_harvard.sh index cddad0a..19cb6b7 100755 --- a/test/test_mips_cpu_harvard.sh +++ b/test/test_mips_cpu_harvard.sh @@ -1,13 +1,13 @@ #!/bin/bash SRC_DIR=${1?Error: no source directory given in argument}; -SRC=$(ls ${SRC_DIR} | grep -E "harvard|memory|alu|regfile|pc|control"); +SRC=$(find ./${SRC_DIR}/*); SRC_TEMP=""; for src in ${SRC} do - SRC_TEMP+=${SRC_DIR}/${src}" "; + SRC_TEMP+=${src}" "; done -SRC=${SRC_TEMP} +SRC=${SRC_TEMP}; INSTR=${2:-"No instruction specified: running all testcases"}; From ec275418b759e85253cda77b1f4cd9765d78f9cb Mon Sep 17 00:00:00 2001 From: jl7719 Date: Wed, 16 Dec 2020 16:59:28 +0000 Subject: [PATCH 2/3] Update harvard testbench regarding resets --- testbench/mips_cpu_harvard_tb.v | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/testbench/mips_cpu_harvard_tb.v b/testbench/mips_cpu_harvard_tb.v index 34a5111..624f9c5 100644 --- a/testbench/mips_cpu_harvard_tb.v +++ b/testbench/mips_cpu_harvard_tb.v @@ -49,15 +49,8 @@ module mips_cpu_harvard_tb; end initial begin - $display("Initial Reset 0"); - reset <= 0; - - - $display("Initial Reset 1"); - @(posedge clk); - reset <= 1; - $display("Initial Reset 0: Start Program"); + reset <= 1; @(posedge clk); reset <= 0; From 697b6e0a9eb8cd870472cc4445ce5bd4252a9c15 Mon Sep 17 00:00:00 2001 From: jl7719 Date: Wed, 16 Dec 2020 17:13:39 +0000 Subject: [PATCH 3/3] Update some testcases for branch delay slots --- .DS_Store | Bin 10244 -> 0 bytes .gitignore | 1 - inputs/slt/slt-1.txt | 4 ++-- inputs/sltu/sltu-1.txt | 4 ++-- inputs/xor/xor-1.txt | 4 ++-- 5 files changed, 6 insertions(+), 7 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 8fdd269299e733eec7e0deb1df2a8c2e5ba52005..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10244 zcmeHMZ)_aJ6@Tx1nB9$oH*tbaZH-n_?-Ap5}du;wY_3* z_t@P##{^Rg1hfKypsElE(UyKdDpF}a^g~-Dq^eYHK_Kx*v;09zk2^e~wV z7W-s0+39SnkUNhtv|^OQ;^IBa!yFnP(tBKQn+Gp#K7R>fWn>XbAkPwkis31 zw@h(@mN7V?U~urj3^xbN2^qg*1Y!i1BEZh>NzlQ85_pmG`ys09_?jo~IB%zWC9CK- z7SkrdfV1?JBF@h(aSrT4XEu==!2}yBPz4{n-ob&+s^_~r=rPcsOkpE7^^IUU(nwvr z;vmD&z!sAhR*iP?p=FkXJx5%(~bjuXUa2ooV#=OuE(iElrUK3pjnjX-%n7ku9G2} z%%ZNsEY*VEDb;0!}UmxYObr zJO;moKfsIdD!dCH!WW3BU<csGfvMf^LY7~g!l4DiNwl}V>Drr`!YH7Z4$g&t} z-u$SJd5-JTNRixHM){Jg)^Hh|7-?TP;_2zAz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G@nyKB$TbA}$4nBAO^+=X8JI-VrIj;8{< tj^`&+(gkNy?w2Dy^Pdxva+Ln(e+IjR?i&}b3NP{v*`aqX; diff --git a/.gitignore b/.gitignore index 8f52a2e..ea6eaf9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,4 @@ exec/* *.out.txt mips_cpu_harvard.vcd .DS_Store -.DS_Store inputs/.DS_Store diff --git a/inputs/slt/slt-1.txt b/inputs/slt/slt-1.txt index ff579ee..2d14014 100644 --- a/inputs/slt/slt-1.txt +++ b/inputs/slt/slt-1.txt @@ -1,4 +1,4 @@ 3404000F 3405000B -0085102A -00000008 \ No newline at end of file +00000008 +0085102A \ No newline at end of file diff --git a/inputs/sltu/sltu-1.txt b/inputs/sltu/sltu-1.txt index 438e8e3..3c29220 100644 --- a/inputs/sltu/sltu-1.txt +++ b/inputs/sltu/sltu-1.txt @@ -1,4 +1,4 @@ 3404000a 34050009 -0085102b -00000008 \ No newline at end of file +00000008 +0085102b \ No newline at end of file diff --git a/inputs/xor/xor-1.txt b/inputs/xor/xor-1.txt index 46f4ec9..2cdcac2 100644 --- a/inputs/xor/xor-1.txt +++ b/inputs/xor/xor-1.txt @@ -1,4 +1,4 @@ 34040005 34050002 -00851026 -00000008 \ No newline at end of file +00000008 +00851026 \ No newline at end of file