diff --git a/verif/trace/verilog/nanosoc_axi_stream_io_8_txd_from_file.v b/verif/trace/verilog/nanosoc_axi_stream_io_8_txd_from_file.v index e62e3e5ea0157d3c1b60063da37366319946e589..eb370448ecf13584d6d0111c09628b7ffb377107 100644 --- a/verif/trace/verilog/nanosoc_axi_stream_io_8_txd_from_file.v +++ b/verif/trace/verilog/nanosoc_axi_stream_io_8_txd_from_file.v @@ -18,7 +18,8 @@ module nanosoc_axi_stream_io_8_txd_from_file #(parameter TXDFILENAME = "adp.cmd", parameter CODEFILENAME = "image.hex", - parameter VERBOSE = 0) + parameter VERBOSE = 0, + parameter FAST_LOAD = 1) ( input wire aclk, input wire aresetn, @@ -104,21 +105,31 @@ localparam BUFSIZE = (64 * 1024); adpbuf[ 9] = "0"; // adpbuf[10] = "0"; // adpbuf[11] = 8'h0a; // newline - adpbuf[12] = "U"; // set upload filesize (N bytes) - adpbuf[13] = " "; // only up to 1Mbyte for now! - adpbuf[14] = FNmap_hex_digit(codesize[19:16]); // - adpbuf[15] = FNmap_hex_digit(codesize[15:12]); // - adpbuf[16] = FNmap_hex_digit(codesize[11: 8]); // - adpbuf[17] = FNmap_hex_digit(codesize[ 7: 4]); // - adpbuf[18] = FNmap_hex_digit(codesize[ 3: 0]); // - adpbuf[19] = 8'h0a; // newline - $readmemh(CODEFILENAME, adpbuf, 20); - adpbuf[clen+20] = "C"; // control - adpbuf[clen+21] = " "; - adpbuf[clen+22] = "2"; // (gpio bit set) - adpbuf[clen+23] = "0"; - adpbuf[clen+24] = "1"; // assert reset to reboot - adpbuf[clen+25] = 8'h0a; // newline + if(FAST_LOAD==0) begin + adpbuf[12] = "U"; // set upload filesize (N bytes) + adpbuf[13] = " "; // only up to 1Mbyte for now! + adpbuf[14] = FNmap_hex_digit(codesize[19:16]); // + adpbuf[15] = FNmap_hex_digit(codesize[15:12]); // + adpbuf[16] = FNmap_hex_digit(codesize[11: 8]); // + adpbuf[17] = FNmap_hex_digit(codesize[ 7: 4]); // + adpbuf[18] = FNmap_hex_digit(codesize[ 3: 0]); // + adpbuf[19] = 8'h0a; // newline + $readmemh(CODEFILENAME, adpbuf, 20); + adpbuf[clen+20] = "C"; // control + adpbuf[clen+21] = " "; + adpbuf[clen+22] = "2"; // (gpio bit set) + adpbuf[clen+23] = "0"; + adpbuf[clen+24] = "1"; // assert reset to reboot + adpbuf[clen+25] = 8'h0a; // newline + end else begin + clen = 0; + adpbuf[12] = "C"; // control + adpbuf[13] = " "; + adpbuf[14] = "2"; // (gpio bit set) + adpbuf[15] = "0"; + adpbuf[16] = "1"; // assert reset to reboot + adpbuf[17] = 8'h0a; // newline + end // append any ADP command file to the code memory preload flen =0; fd= $fopen(TXDFILENAME,"r");