Skip to content

Commit 68946aa

Browse files
committed
First attempt at generating control unit
Also ignore mccalla generated code
1 parent aa13a6e commit 68946aa

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
quartus
2+
src/mccalla

src/computer_build.clj

+4-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@
104104
(defn build* [cpuname instructions]
105105
(.mkdir (java.io.File. cpuname))
106106
(let [states (merge static-states (make-states instructions))]
107-
(with-open [main-vhdl (java.io.FileWriter. (str cpuname "/main.vhdl"))]
107+
(with-open [main-vhdl (java.io.FileWriter. (str cpuname "/main.vhdl"))
108+
control-vhdl (java.io.FileWriter. (str cpuname "/control.vhdl"))]
109+
(binding [*out* control-vhdl]
110+
(generate-vhdl (control-unit instructions)))
108111
(binding [*out* main-vhdl]
109112
(generate-vhdl `(entity "main"
110113
; ports

0 commit comments

Comments
 (0)