minor scope tweaks, need phantomjs for wavedrom

This commit is contained in:
Steven Hugg 2018-10-09 21:49:29 -04:00
parent 24d681cbb8
commit 3ff3789bf8
5 changed files with 9 additions and 5 deletions

View File

@ -70,10 +70,10 @@ TODO:
- fix WebAudio (https://news.ycombinator.com/item?id=18066474)
- Safari: verilog scope doesn't work
- share playable link w/ verilog?
- no errors for verilog inline asm?
- allow download of JSASM output
- update bootstrap/jquery
- clean BOM from verilog
- $readmemb/h
WEB WORKER FORMAT

View File

@ -14,6 +14,7 @@
"jsdom": "^12.0.0",
"lzg": "^1.0.0",
"mocha": "^5.2.0",
"phantomjs": "^2.1.7",
"typescript": "^3.0.1",
"wavedrom-cli": "^0.5.0"
},

View File

@ -26,6 +26,7 @@ module starfield_top(clk, reset, hsync, vsync, rgb);
.vpos(vpos)
);
// enable LFSR only in 256x256 area
wire star_enable = !hpos[8] & !vpos[8];
// LFSR with period = 2^16-1 = 256*256-1
@ -35,7 +36,7 @@ module starfield_top(clk, reset, hsync, vsync, rgb);
.enable(star_enable),
.lfsr(lfsr));
wire star_on = &lfsr[15:9];
wire star_on = &lfsr[15:9]; // all 7 bits must be set
assign rgb = display_on && star_on ? lfsr[2:0] : 0;
endmodule

View File

@ -671,6 +671,7 @@ var VerilogPlatform = function(mainElement, options) {
if (trace_buffer) trace_buffer.fill(0);
if (video) video.setRotate(gen.rotate ? -90 : 0);
$("#verilog_bar").hide();
if (!this.hasvideo) this.resume(); // TODO?
}
tick() {
gen.tick2();

View File

@ -197,10 +197,11 @@ export class WaveformView {
var x = 0;
var y = 0;
var lastval = -1;
var radix = this.hexformat ? 16 : 10;
for (var i=0; i<data.length; i++) {
var val = data[i];
if (printvals && val != lastval) {
ctx.fillText(val.toString(), x+this.zoom/4, ycen);
if (printvals && val != lastval && x < w-100) { // close to right edge? omit
ctx.fillText(val.toString(radix), x+this.zoom/4, ycen);
}
lastval = val;
if (i>0)
@ -229,7 +230,7 @@ export class WaveformView {
var val = data[this.tsel - this.t0];
ctx.textAlign = 'right';
if (val !== undefined) {
var s = this.hexformat ? val.toString(16) : val.toString();
var s = val.toString(radix);
ctx.fillText(s, w-fh, ycen);
}
}