summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Blake Kongslie2021-03-28 14:03:50 -0700
committerJulian Blake Kongslie2021-03-28 14:03:50 -0700
commit93a4ad185a48e8f2da76cc62fca8160ba4c960a6 (patch)
treeb8bbd0f85b31fd85bcc8efb961bbc66fc8b11fec
parentParallel verilator build. (diff)
downloadtoycpu-main.tar.xz
Trivial changes from actually testing at Ducky office.HEADmain
Diffstat (limited to '')
-rw-r--r--altera/clocks.sdc2
-rw-r--r--altera/jtag.cdf5
-rw-r--r--hdl/top.sv6
-rw-r--r--tcl/init.tcl2
4 files changed, 10 insertions, 5 deletions
diff --git a/altera/clocks.sdc b/altera/clocks.sdc
index f613011..239c91a 100644
--- a/altera/clocks.sdc
+++ b/altera/clocks.sdc
@@ -1 +1,3 @@
1# This is the clock for timing analysis, not timing-driven synthesis.
2# See init.tcl for the other clock.
1create_clock -period "50 MHz" clk 3create_clock -period "50 MHz" clk
diff --git a/altera/jtag.cdf b/altera/jtag.cdf
index cbe240b..ac80090 100644
--- a/altera/jtag.cdf
+++ b/altera/jtag.cdf
@@ -1,10 +1,9 @@
1/* XXX Copy this from a working setup on Ducky hardware */
2JedecChain; 1JedecChain;
3 FileRevision(JESD32A); 2 FileRevision(JESD32A);
4 DefaultMfr(6E); 3 DefaultMfr(6E);
5 4
6 P ActionCode(Cfg) 5 P ActionCode(Ign)
7 Device PartName(10CL025YU256) Path("C:/Users/mike/Desktop/toycpu/") File("toycpu.pof") MfrSpec(OpMask(1)); 6 Device PartName(10CL025Y) MfrSpec(OpMask(0));
8 7
9ChainEnd; 8ChainEnd;
10 9
diff --git a/hdl/top.sv b/hdl/top.sv
index c2f56bc..41b3e23 100644
--- a/hdl/top.sv
+++ b/hdl/top.sv
@@ -11,8 +11,10 @@ module top
11 , input bit reset_n // verilator public 11 , input bit reset_n // verilator public
12 ); 12 );
13 13
14bit reset; 14bit reset = 0;
15assign reset = !reset_n; 15bit have_reset = 0;
16always_ff @(posedge clk) if (reset) have_reset <= 1;
17assign reset = !reset_n || !have_reset;
16 18
17bit [7:0] rom [0:(1<<ROM_BITS)-1]; 19bit [7:0] rom [0:(1<<ROM_BITS)-1];
18initial $readmemh("mem/rom.hex", rom); 20initial $readmemh("mem/rom.hex", rom);
diff --git a/tcl/init.tcl b/tcl/init.tcl
index 6621e6a..689a61c 100644
--- a/tcl/init.tcl
+++ b/tcl/init.tcl
@@ -14,6 +14,8 @@ proc pin {loc net} {
14pin E1 clk 14pin E1 clk
15pin J15 reset_n 15pin J15 reset_n
16 16
17# This is the clock for timing-driven synthesis, not timing analysis.
18# See clocks.sdf for the other clock.
17create_base_clock -fmax "50 MHz" clk 19create_base_clock -fmax "50 MHz" clk
18 20
19proc add_files {typ ext dir} { 21proc add_files {typ ext dir} {