diff --git a/Makefile b/Makefile index f3a187fa..98e44dd3 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ lint: # https://github.com/Kentzo/git-archive-all archive: mkdir -p release - git-archive-all --prefix 8bitworkshop-2.0/ release/8bitworkshop-2.0.zip # 2.0 + git-archive-all --prefix 8bitworkshop-3.2.0/ release/8bitworkshop-3.2.0.zip # 3.2.0 #git-archive-all --prefix 8bitworkshop-1.1/ release/8bitworkshop-1.1.zip 1.1 git archive --prefix 8bitworkshop- -o release/8bitworkshop-tools.zip HEAD tools diff --git a/src/platform/verilog.ts b/src/platform/verilog.ts index 5903a107..60079d0c 100644 --- a/src/platform/verilog.ts +++ b/src/platform/verilog.ts @@ -744,4 +744,24 @@ var VerilogPlatform = function(mainElement, options) { //////////////// +var VERILOG_SIM_PRESETS = [ + {id:'clock_divider.v', name:'Clock Divider'}, + {id:'lfsr.v', name:'Linear Feedback Shift Register'}, + {id:'hvsync_generator.v', name:'Video Sync Generator'}, + {id:'test_hvsync.v', name:'Test Pattern'}, + {id:'starfield.v', name:'Scrolling Starfield'}, + {id:'chardisplay.v', name:'RAM Text Display'}, + {id:'sound_generator.v', name:'Sound Generator'}, +]; + + +var VerilogSimulatorPlatform = function(mainElement, options) { + this.__proto__ = new (VerilogPlatform as any)(mainElement, options); + + this.getPresets = function() { return VERILOG_SIM_PRESETS; } +} + +//////////////// + PLATFORMS['verilog'] = VerilogPlatform; +PLATFORMS['verilog.sim'] = VerilogSimulatorPlatform; diff --git a/src/project.ts b/src/project.ts index 1feaed57..1dbf9c20 100644 --- a/src/project.ts +++ b/src/project.ts @@ -59,7 +59,7 @@ export class CodeProject { parseIncludeDependencies(text:string):string[] { var files = []; - if (this.platform_id == 'verilog') { + if (this.platform_id.startsWith('verilog')) { var re = /^\s*(`include|[.]include)\s+"(.+?)"/gmi; var m; while (m = re.exec(text)) { @@ -80,7 +80,7 @@ export class CodeProject { parseLinkDependencies(text:string):string[] { var files = []; - if (this.platform_id == 'verilog') { + if (this.platform_id.startsWith('verilog')) { // } else { // for .c -- //#link "file" (or ;link or #link) @@ -229,7 +229,7 @@ export class CodeProject { console.log(err); // TODO? } if (!depends) depends = []; - if (this.platform_id == 'verilog') { + if (this.platform_id.startsWith('verilog')) { // TODO: should get rid of this msg format this.worker.postMessage({ code:text, diff --git a/src/ui.ts b/src/ui.ts index da1ae5d5..449c59f6 100644 --- a/src/ui.ts +++ b/src/ui.ts @@ -893,7 +893,7 @@ function setupDebugControls(){ } else $("#dbg_tovsync").hide(); - if ((platform.runEval || platform.runToPC) && platform_id != 'verilog') { + if ((platform.runEval || platform.runToPC) && !platform_id.startsWith('verilog')) { $("#dbg_toline").click(runToCursor).show(); Mousetrap.bindGlobal('ctrl+alt+l', runToCursor); } else diff --git a/verilog.html b/verilog.html new file mode 100644 index 00000000..f0b5760d --- /dev/null +++ b/verilog.html @@ -0,0 +1,228 @@ + + + +8bitworkshop IDE + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +