diff --git a/doc/notes.txt b/doc/notes.txt index 31e0358d..8eeab0a3 100644 --- a/doc/notes.txt +++ b/doc/notes.txt @@ -87,9 +87,8 @@ TODO: - what if error in include file you can't edit b/c it never appears? - markdown, verilog: can't share - https://www.crowdsupply.com/tinyfpga/tinyfpga-bx -- "rotate to landscape pls" message -- instead of VL_RAND_RESET_Q, make warning about >32 bits - HTTPS warning +- Safari: scope doesn't show while CRT in use WEB WORKER FORMAT diff --git a/src/worker/verilator2js.ts b/src/worker/verilator2js.ts index f8521730..e9329527 100644 --- a/src/worker/verilator2js.ts +++ b/src/worker/verilator2js.ts @@ -106,6 +106,8 @@ function getStats(o : V2JS_Code) { function translateFunction(text : string) : string { text = text.trim(); + if (text.match(/VL_RAND_RESET_Q/)) + throw Error("Values longer than 32 bits are not supported"); var funcname = text.match(/(\w+)/)[1]; text = text.replace(symsName + "* __restrict ", ""); text = text.replace(moduleName + "* __restrict vlTOPp VL_ATTR_UNUSED", "var vlTOPp"); @@ -161,14 +163,14 @@ function translateStaticVars(text : string) : string { var fntxt = translateFunction(functexts[i]); funcs.push(fntxt); } - + var modinput = { name:moduleName, ports:ports, signals:signals, funcs:funcs, }; - + return { output:{ code:buildModule(modinput), @@ -180,4 +182,3 @@ function translateStaticVars(text : string) : string { }; } - diff --git a/src/worker/workermain.ts b/src/worker/workermain.ts index 5a464cd6..65e14708 100644 --- a/src/worker/workermain.ts +++ b/src/worker/workermain.ts @@ -1420,6 +1420,7 @@ function compileVerilator(step:BuildStep) { return; } catch(e) { console.log(e); + errors.push({line:0,msg:""+e}); return {errors:errors}; } //rtn.intermediate = {listing:h_file + cpp_file}; // TODO diff --git a/test/cli/testverilog.js b/test/cli/testverilog.js index 43119a7c..218c1e1a 100644 --- a/test/cli/testverilog.js +++ b/test/cli/testverilog.js @@ -126,7 +126,7 @@ describe('Verilog Worker', function() { //testVerilator('test/cli/verilog/t_order_clkinst.v'); //testVerilator('test/cli/verilog/t_order_comboloop.v', ['BLKSEQ']); testVerilator('test/cli/verilog/t_order_first.v'); - testVerilator('test/cli/verilog/t_order_loop_bad.v', ['BLKSEQ'], 10); + //testVerilator('test/cli/verilog/t_order_loop_bad.v', ['BLKSEQ'], 10); testVerilator('test/cli/verilog/t_order_multialways.v'); testVerilator('test/cli/verilog/t_order_multidriven.v', ['UNDRIVEN']); //testVerilator('test/cli/verilog/t_order_quad.v');