Commit 05378ee7 authored by Andrey Filippov's avatar Andrey Filippov

working on synthesis with Vivado tools

parent df69d555
......@@ -2,79 +2,5 @@
// TODO: Fix VDT - without IVERILOG defined, closure does not include modules needed for Icarus
`define IVERILOG 1
`undef DEBUG_FIFO
`define USE_CMD_ENCOD_TILED_32_RD 1
// It can be used to check different `ifdef branches
//`define XIL_TIMING //Simprim
`define den4096Mb 1
// `define IVERILOG
// defines for memory channels
// chn 0 is read from memory and write to memory
`define def_enable_mem_chn0
`define def_read_mem_chn0
`define def_write_mem_chn0
`undef def_scanline_chn0
`undef def_tiled_chn0
// chn 1 is scanline r+w
`define def_enable_mem_chn1
`define def_read_mem_chn1
`define def_write_mem_chn1
`define def_scanline_chn1
`undef def_tiled_chn1
// chn 2 is tiled r+w
`define def_enable_mem_chn2
`define def_read_mem_chn2
`define def_write_mem_chn2
`undef def_scanline_chn2
`define def_tiled_chn2
// chn 3 is scanline r+w (reuse later)
`define def_enable_mem_chn3
`define def_read_mem_chn3
`define def_write_mem_chn3
`define def_scanline_chn3
`undef def_tiled_chn3
// chn 4 is tiled r+w (reuse later)
`define def_enable_mem_chn4
`define def_read_mem_chn4
`define def_write_mem_chn4
`undef def_scanline_chn4
`define def_tiled_chn4
// chn 5 is disabled
`undef def_enable_mem_chn5
// chn 6 is disabled
`undef def_enable_mem_chn6
// chn 7 is disabled
`undef def_enable_mem_chn7
// chn 8 is disabled
`undef def_enable_mem_chn8
// chn 9 is disabled
`undef def_enable_mem_chn9
// chn 10 is disabled
`undef def_enable_mem_chn10
// chn 11 is disabled
`undef def_enable_mem_chn11
// chn 12 is disabled
`undef def_enable_mem_chn12
// chn 13 is disabled
`undef def_enable_mem_chn13
// chn 14 is disabled
`undef def_enable_mem_chn14
// chn 15 is disabled
`undef def_enable_mem_chn15
`include "system_defines.vh"
\ No newline at end of file
......@@ -52,87 +52,87 @@
<link>
<name>ise_logs/ISExst.log</name>
<type>1</type>
<location>ise_logs/ISExst-20140607155721361.log</location>
<location>/home/andrey/git/x393/ise_logs/ISExst-20150226190731427.log</location>
</link>
<link>
<name>ise_state/x393-synth.tgz</name>
<type>1</type>
<location>ise_state/x393-synth-20140607155721361.tgz</location>
<location>/home/andrey/git/x393/ise_state/x393-synth-20150226190731427.tgz</location>
</link>
<link>
<name>vivado_logs/VivadoBitstream.log</name>
<type>1</type>
<location>vivado_logs/VivadoBitstream-20140611174132808.log</location>
<locationURI>vivado_logs/VivadoBitstream-20140611174132808.log</locationURI>
</link>
<link>
<name>vivado_logs/VivadoOpt.log</name>
<type>1</type>
<location>vivado_logs/VivadoOpt-20140611174132808.log</location>
<locationURI>vivado_logs/VivadoOpt-20140611174132808.log</locationURI>
</link>
<link>
<name>vivado_logs/VivadoOptPhys.log</name>
<type>1</type>
<location>vivado_logs/VivadoOptPhys-20140611174132808.log</location>
<locationURI>vivado_logs/VivadoOptPhys-20140611174132808.log</locationURI>
</link>
<link>
<name>vivado_logs/VivadoOptPower.log</name>
<type>1</type>
<location>vivado_logs/VivadoOptPower-20140611174132808.log</location>
<locationURI>vivado_logs/VivadoOptPower-20140611174132808.log</locationURI>
</link>
<link>
<name>vivado_logs/VivadoPlace.log</name>
<type>1</type>
<location>vivado_logs/VivadoPlace-20140611174132808.log</location>
<locationURI>vivado_logs/VivadoPlace-20140611174132808.log</locationURI>
</link>
<link>
<name>vivado_logs/VivadoRoute.log</name>
<type>1</type>
<location>vivado_logs/VivadoRoute-20140611174132808.log</location>
<locationURI>vivado_logs/VivadoRoute-20140611174132808.log</locationURI>
</link>
<link>
<name>vivado_logs/VivadoSynthesis.log</name>
<type>1</type>
<location>vivado_logs/VivadoSynthesis-20140611174056482.log</location>
<location>/home/andrey/git/x393/vivado_logs/VivadoSynthesis-20150227195107460.log</location>
</link>
<link>
<name>vivado_logs/VivadoTimimgSummaryReportImplemented.log</name>
<type>1</type>
<location>vivado_logs/VivadoTimimgSummaryReportImplemented-20140611174132808.log</location>
<locationURI>vivado_logs/VivadoTimimgSummaryReportImplemented-20140611174132808.log</locationURI>
</link>
<link>
<name>vivado_logs/VivadoTimimgSummaryReportSynthesis.log</name>
<type>1</type>
<location>vivado_logs/VivadoTimimgSummaryReportSynthesis-20140611174132808.log</location>
<location>/home/andrey/git/x393/vivado_logs/VivadoTimimgSummaryReportSynthesis-20150227195107460.log</location>
</link>
<link>
<name>vivado_logs/VivadoTimingReportImplemented.log</name>
<type>1</type>
<location>vivado_logs/VivadoTimingReportImplemented-20140611174132808.log</location>
<locationURI>vivado_logs/VivadoTimingReportImplemented-20140611174132808.log</locationURI>
</link>
<link>
<name>vivado_logs/VivadoTimingReportSynthesis.log</name>
<type>1</type>
<location>vivado_logs/VivadoTimingReportSynthesis-20140611174132808.log</location>
<location>/home/andrey/git/x393/vivado_logs/VivadoTimingReportSynthesis-20150227195107460.log</location>
</link>
<link>
<name>vivado_state/x393-opt-phys.dcp</name>
<type>1</type>
<location>vivado_state/x393-opt-phys-20140611174132808.dcp</location>
<locationURI>vivado_state/x393-opt-phys-20140611174132808.dcp</locationURI>
</link>
<link>
<name>vivado_state/x393-place.dcp</name>
<type>1</type>
<location>vivado_state/x393-place-20140611174132808.dcp</location>
<locationURI>vivado_state/x393-place-20140611174132808.dcp</locationURI>
</link>
<link>
<name>vivado_state/x393-route.dcp</name>
<type>1</type>
<location>vivado_state/x393-route-20140611174132808.dcp</location>
<locationURI>vivado_state/x393-route-20140611174132808.dcp</locationURI>
</link>
<link>
<name>vivado_state/x393-synth.dcp</name>
<type>1</type>
<location>vivado_state/x393-synth-20140610113942407.dcp</location>
<location>/home/andrey/git/x393/vivado_state/x393-synth-20150227195107460.dcp</location>
</link>
</linkedResources>
</projectDescription>
ISExst_170_constraints=ddrc_test01.xcf
com.elphel.store.context.ISExst=ISExst_170_constraints<-@\#\#@->
ISExst_96_OtherProblems=HDLCompiler\:413<-@\#\#@->
com.elphel.store.context.ISExst=ISExst_170_constraints<-@\#\#@->ISExst_96_OtherProblems<-@\#\#@->
eclipse.preferences.version=1
VivadoSynthesis_102_ConstraintsFiles=ddrc_test01.xdc<-@\#\#@->ddrc_test01_timing.xdc<-@\#\#@->
VivadoSynthesis_101_MaxMsg=10000
VivadoSynthesis_102_ConstraintsFiles=x393.xdc<-@\#\#@->x393_timing.xdc<-@\#\#@->
VivadoSynthesis_115_flatten_hierarchy=none
VivadoSynthesis_127_verbose=true
VivadoSynthesis_81_parser_mode=1
VivadoSynthesis_93_OtherProblems=Netlist 29-345<-@\#\#@->Board 49-26<-@\#\#@->
VivadoSynthesis_95_ShowInfo=false
com.elphel.store.context.VivadoSynthesis=VivadoSynthesis_102_ConstraintsFiles<-@\#\#@->VivadoSynthesis_95_ShowInfo<-@\#\#@->VivadoSynthesis_115_flatten_hierarchy<-@\#\#@->
com.elphel.store.context.VivadoSynthesis=VivadoSynthesis_102_ConstraintsFiles<-@\#\#@->VivadoSynthesis_95_ShowInfo<-@\#\#@->VivadoSynthesis_115_flatten_hierarchy<-@\#\#@->VivadoSynthesis_101_MaxMsg<-@\#\#@->VivadoSynthesis_127_verbose<-@\#\#@->VivadoSynthesis_93_OtherProblems<-@\#\#@->VivadoSynthesis_81_parser_mode<-@\#\#@->
eclipse.preferences.version=1
......@@ -19,6 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
// Check that this fix did not break anything:
`include "system_defines.vh"
`define USE_SHORT_REN_REGEN
module axibram_read #(
parameter ADDRESS_BITS = 10 // number of memory address bits
......
......@@ -20,6 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
//`define DEBUG_FIFO 1
`include "system_defines.vh"
`undef DEBUG_FIFO
module axibram_write #(
parameter ADDRESS_BITS = 10 // number of memory address bits
......
......@@ -208,7 +208,7 @@
parameter MAX_TILE_WIDTH= 6, // number of bits to specify maximal tile (width-1) (6 -> 64)
parameter MAX_TILE_HEIGHT= 6, // number of bits to specify maximal tile (height-1) (6 -> 64)
parameter MCNTRL_TILED_CHN2_ADDR= 'h140,
parameter MCNTRL_TILED_CHN4_ADDR= 'h140,
parameter MCNTRL_TILED_CHN4_ADDR= 'h150,
parameter MCNTRL_TILED_MASK= 'h3f0, // both channels 0 and 1
parameter MCNTRL_TILED_MODE= 'h0, // set mode register: {extra_pages[1:0],write_mode,enable,!reset}
parameter MCNTRL_TILED_STATUS_CNTRL= 'h1, // control status reporting
......
......@@ -25,27 +25,27 @@ module cmd_encod_4mux(
input clk,
input start0, // this channel was started
input [31:0] enc_cmd0, // encoded commnad
input [31:0] enc_cmd0, // encoded command
input enc_wr0, // write encoded command
input enc_done0, // encoding finished
input start1, // this channel was started
input [31:0] enc_cmd1, // encoded commnad
input [31:0] enc_cmd1, // encoded command
input enc_wr1, // write encoded command
input enc_done1, // encoding finished
input start2, // this channel was started
input [31:0] enc_cmd2, // encoded commnad
input [31:0] enc_cmd2, // encoded command
input enc_wr2, // write encoded command
input enc_done2, // encoding finished
input start3, // this channel was started
input [31:0] enc_cmd3, // encoded commnad
input [31:0] enc_cmd3, // encoded command
input enc_wr3, // write encoded command
input enc_done3, // encoding finished
output reg start, // combined output was started (1 clk from |start*)
output reg [31:0] enc_cmd, // encoded commnad
output reg [31:0] enc_cmd, // encoded command
output reg enc_wr, // write encoded command
output reg enc_done // encoding finished
);
......
......@@ -21,7 +21,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
`timescale 1ns/1ps
`include "system_defines.vh"
module cmd_encod_linear_mux#(
parameter ADDRESS_NUMBER= 15,
parameter COLADDR_NUMBER= 10
......
......@@ -40,7 +40,7 @@ module cmd_encod_linear_rd #(
input [NUM_XFER_BITS-1:0] num128_in, // number of 128-bit words to transfer (8*16 bits) - full bursts of 8 ( 0 - maximal length, 64)
input skip_next_page_in, // do not reset external buffer (continue)
input start, // start generating commands
output reg [31:0] enc_cmd, // encoded commnad
output reg [31:0] enc_cmd, // encoded command SuppressThisWarning VivadoSynthesis [Synth 8-3332] Sequential element cmd_encod_linear_rd.enc_cmd_reg[10:9,7:5,2] is unused and will be removed from module cmd_encod_linear_rd.
output reg enc_wr, // write encoded command
output reg enc_done // encoding finished
);
......@@ -77,7 +77,7 @@ module cmd_encod_linear_rd #(
// reg gen_run_d;
reg [ROM_DEPTH-1:0] gen_addr; // will overrun as stop comes from ROM
reg [ROM_WIDTH-1:0] rom_r;
reg [ROM_WIDTH-1:0] rom_r; // SuppressThisWarning VivadoSynthesis [Synth 8-3332] Sequential element cmd_encod_linear_rd.rom_r_reg[0] is unused and will be removed from module cmd_encod_linear_rd.
wire pre_done;
wire [1:0] rom_cmd;
wire [1:0] rom_skip;
......
......@@ -41,14 +41,14 @@ module cmd_encod_linear_rw#(
input start_rd, // start generating commands by cmd_encod_linear_rd
input start_wr, // start generating commands by cmd_encod_linear_wr
output reg start, // this channel was started (1 clk from start_rd || start_wr
output reg [31:0] enc_cmd, // encoded commnad
output reg [31:0] enc_cmd, // encoded command
output reg enc_wr, // write encoded command
output reg enc_done // encoding finished
);
wire [31:0] enc_cmd_rd; // encoded commnad
wire [31:0] enc_cmd_rd; // encoded command
wire enc_wr_rd; // write encoded command
wire enc_done_rd; // encoding finished
wire [31:0] enc_cmd_wr; // encoded commnad
wire [31:0] enc_cmd_wr; // encoded command
wire enc_wr_wr; // write encoded command
wire enc_done_wr; // encoding finished
reg select_wr;
......
......@@ -37,7 +37,7 @@ module cmd_encod_linear_wr #(
input [NUM_XFER_BITS-1:0] num128_in, // number of 128-bit words to transfer (8*16 bits) - full burst of 8 (0 - full 64)
input skip_next_page_in, // do not reset external buffer (continue)
input start, // start generating commands
output reg [31:0] enc_cmd, // encoded commnad
output reg [31:0] enc_cmd, // encoded command SuppressThisWarning VivadoSynthesis [Synth 8-3332] Sequential element cmd_encod_linear_wr.enc_cmd_reg[9,6,4:3] is unused and will be removed from module cmd_encod_linear_wr.
output reg enc_wr, // write encoded command
output reg enc_done // encoding finished
);
......@@ -90,7 +90,7 @@ module cmd_encod_linear_wr #(
// reg gen_run_d;
reg [ROM_DEPTH-1:0] gen_addr; // will overrun as stop comes from ROM
reg [ROM_WIDTH-1:0] rom_r;
reg [ROM_WIDTH-1:0] rom_r; // SuppressThisWarning VivadoSynthesis: [Synth 8-3332] Sequential element cmd_encod_linear_wr.rom_r_reg[8] is unused and will be removed from module cmd_encod_linear_wr.
wire pre_done;
wire [1:0] rom_cmd;
wire [1:0] rom_skip;
......@@ -103,7 +103,7 @@ module cmd_encod_linear_wr #(
reg dual_write; // Two bursts have to be written
reg few_write; //write 1,2 or 3 bursts
wire write_addr_w; // gen_addr that generates write commands
reg [ROM_DEPTH-1:0] jump_gen_addr; // will overrun as stop comes from ROM
reg [ROM_DEPTH-1:0] jump_gen_addr; // will overrun as stop comes from ROM SuppressThisWarning VivadoSynthesis: [Synth 8-3332] Sequential element cmd_encod_linear_wr.jump_gen_addr_reg[0] is unused and will be removed from module cmd_encod_linear_wr.
assign pre_done=rom_r[ENC_PRE_DONE] && gen_run;
assign rom_cmd= rom_r[ENC_CMD_SHIFT+:2];
......@@ -155,7 +155,7 @@ module cmd_encod_linear_wr #(
// else few_write <= single_write | dual_write | triple_write;
if (rst) jump_gen_addr <= 0;
else jump_gen_addr <= single_write ? NO_WRITE_ADDR : (dual_write ? LAST_WRITE_ADDR:PRELAST_WRITE_ADDR);
else jump_gen_addr <= single_write ? NO_WRITE_ADDR : (dual_write ? LAST_WRITE_ADDR : PRELAST_WRITE_ADDR);
//triple_write
......
......@@ -63,7 +63,7 @@ module cmd_encod_tiled_32_rd #(
input keep_open_in, // keep banks open (for <=8 banks only
input skip_next_page_in, // do not reset external buffer (continue)
input start, // start generating commands
output reg [31:0] enc_cmd, // encoded commnad
output reg [31:0] enc_cmd, // encoded command SuppressThisWarning VivadoSynthesis: [Synth 8-3332] Sequential element cmd_encod_tiled_32_rd.enc_cmd_reg[11:9,7:5,2] is unused and will be removed from module cmd_encod_tiled_32_rd.
output reg enc_wr, // write encoded command
output reg enc_done // encoding finished
);
......@@ -94,10 +94,10 @@ module cmd_encod_tiled_32_rd #(
// localparam AUTOPRECHARGE_BIT=COLADDR_NUMBER;
reg [ADDRESS_NUMBER-1:0] row; // memory row
reg [COLADDR_NUMBER-4:0] col; // start memory column in 8-bursts
reg [COLADDR_NUMBER-4:0] col; // start memory column in 8-bursts SuppressThisWarning VivadoSynthesis: [Synth 8-3332] Sequential element cmd_encod_tiled_32_rd.col_reg[0] is unused and will be removed from module cmd_encod_tiled_32_rd.
reg [2:0] bank; // memory bank;
reg [5:0] num_rows_m1; // number of rows in a tile minus 1
reg [5:0] num_cols128_m2; // number of r16-byte columns in a tile -2 (even columns)
reg [5:0] num_cols128_m2; // number of r16-byte columns in a tile -2 (even columns) SuppressThisWarning VivadoSynthesis: [Synth 8-3332] Sequential element cmd_encod_tiled_32_rd.num_cols128_m2_reg[0] is unused and will be removed from module cmd_encod_tiled_32_rd.
// reg [FULL_ADDR_NUMBER-4:0] rowcol_inc; // increment {row.col} when bank rolls over, remove 3 LSBs (in 8-bursts)
reg [FRAME_WIDTH_BITS:0] rowcol_inc; // increment {row.col} when bank rolls over, remove 3 LSBs (in 8-bursts)
......@@ -120,7 +120,7 @@ module cmd_encod_tiled_32_rd #(
wire pre_act; //1 cycle before optional ACTIVATE
wire pre_read; //1 cycle before READ command
reg [5:0] scan_row; // current row in a tile (valid @pre_act)
reg [5:0] scan_col; // current 16-byte column in a tile (valid @pre_act)
reg [5:0] scan_col; // current 16-byte column in a tile (valid @pre_act) SuppressThisWarning VivadoSynthesis: [Synth 8-3332] Sequential element cmd_encod_tiled_32_rd.scan_col_reg[0] is unused and will be removed from module cmd_encod_tiled_32_rd.
reg start_d; // start, delayed by 1 clocks
wire last_row;
reg [FULL_ADDR_NUMBER-1:0] row_col_bank; // RA,CA, BA - valid @pre_act;
......@@ -269,7 +269,7 @@ module cmd_encod_tiled_32_rd #(
rom_cmd[1]?
row_col_bank[2:0]:
col_bank[2:0], //
full_cmd[2:0], // rcw; // RAS/CAS/WE, positive logic
full_cmd[2:0], // rcw; // RAS/CAS/WE, positive logic. full_cmd[0]==0 (never write/precharge) => enc_cmd_reg[11]==0
1'b0, // odt_en; // enable ODT
1'b0, // cke; // disable CKE
rom_r[ENC_SEL], // sel; // first/second half-cycle, other will be nop (cke+odt applicable to both)
......
......@@ -41,14 +41,14 @@ module cmd_encod_tiled_32_rw #(
input start_rd, // start generating commands by cmd_encod_linear_rd
input start_wr, // start generating commands by cmd_encod_linear_wr
output reg start, // this channel was started (1 clk from start_rd || start_wr
output reg [31:0] enc_cmd, // encoded commnad
output reg [31:0] enc_cmd, // encoded command
output reg enc_wr, // write encoded command
output reg enc_done // encoding finished
);
wire [31:0] enc_cmd_rd; // encoded commnad
wire [31:0] enc_cmd_rd; // encoded command
wire enc_wr_rd; // write encoded command
wire enc_done_rd; // encoding finished
wire [31:0] enc_cmd_wr; // encoded commnad
wire [31:0] enc_cmd_wr; // encoded command
wire enc_wr_wr; // write encoded command
wire enc_done_wr; // encoding finished
reg select_wr;
......
......@@ -63,7 +63,7 @@ module cmd_encod_tiled_32_wr #(
input keep_open_in, // keep banks open (for <=8 banks only
input skip_next_page_in, // do not reset external buffer (continue)
input start, // start generating commands
output reg [31:0] enc_cmd, // encoded commnad
output reg [31:0] enc_cmd, // encoded command
output reg enc_wr, // write encoded command
output reg enc_done // encoding finished
);
......
......@@ -21,7 +21,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
`timescale 1ns/1ps
`include "system_defines.vh"
module cmd_encod_tiled_mux #(
parameter ADDRESS_NUMBER= 15,
parameter COLADDR_NUMBER= 10,
......
......@@ -63,7 +63,7 @@ module cmd_encod_tiled_rd #(
input keep_open_in, // keep banks open (for <=8 banks only
input skip_next_page_in, // do not reset external buffer (continue)
input start, // start generating commands
output reg [31:0] enc_cmd, // encoded commnad
output reg [31:0] enc_cmd, // encoded command SuppressThisWarning VivadoSynthesis: [Synth 8-3332] Sequential element cmd_encod_tiled_rd.enc_cmd_reg[11:9,7:5,2] is unused and will be removed from module cmd_encod_tiled_rd.
output reg enc_wr, // write encoded command
output reg enc_done // encoding finished
);
......@@ -264,7 +264,7 @@ module cmd_encod_tiled_rd #(
rom_cmd[1]?
row_col_bank[2:0]:
col_bank[2:0], //
full_cmd[2:0], // rcw; // RAS/CAS/WE, positive logic
full_cmd[2:0], // rcw; // RAS/CAS/WE, positive logic. full_cmd[0]==0 (never write/precharge) => enc_cmd_reg[11]==0
1'b0, // odt_en; // enable ODT
1'b0, // cke; // disable CKE
rom_r[ENC_SEL], // sel; // first/second half-cycle, other will be nop (cke+odt applicable to both)
......
......@@ -41,14 +41,14 @@ module cmd_encod_tiled_rw #(
input start_rd, // start generating commands by cmd_encod_linear_rd
input start_wr, // start generating commands by cmd_encod_linear_wr
output reg start, // this channel was started (1 clk from start_rd || start_wr
output reg [31:0] enc_cmd, // encoded commnad
output reg [31:0] enc_cmd, // encoded command
output reg enc_wr, // write encoded command
output reg enc_done // encoding finished
);
wire [31:0] enc_cmd_rd; // encoded commnad
wire [31:0] enc_cmd_rd; // encoded command
wire enc_wr_rd; // write encoded command
wire enc_done_rd; // encoding finished
wire [31:0] enc_cmd_wr; // encoded commnad
wire [31:0] enc_cmd_wr; // encoded command
wire enc_wr_wr; // write encoded command
wire enc_done_wr; // encoding finished
reg select_wr;
......
......@@ -64,7 +64,7 @@ module cmd_encod_tiled_wr #(
input keep_open_in, // keep banks open (for <=8 banks only
input skip_next_page_in, // do not reset external buffer (continue)
input start, // start generating commands
output reg [31:0] enc_cmd, // encoded commnad
output reg [31:0] enc_cmd, // encoded command SuppressThisWarning VivadoSynthesis: [Synth 8-3332] Sequential element cmd_encod_tiled_wr.enc_cmd_reg[11,9,6,4:3,1] is unused and will be removed from module cmd_encod_tiled_wr.
output reg enc_wr, // write encoded command
output reg enc_done // encoding finished
);
......@@ -107,7 +107,7 @@ module cmd_encod_tiled_wr #(
// reg gen_run_d; // to output "done"?
reg [ROM_DEPTH-1:0] gen_addr; // will overrun as stop comes from ROM
reg [ROM_WIDTH-1:0] rom_r;
reg [ROM_WIDTH-1:0] rom_r; // SuppressThisWarning VivadoSynthesis: [Synth 8-3332] Sequential element cmd_encod_tiled_wr.rom_r_reg[8,0] is unused and will be removed from module cmd_encod_tiled_wr.
wire pre_done;
wire [1:0] rom_cmd;
wire [1:0] rom_skip;
......@@ -153,7 +153,7 @@ module cmd_encod_tiled_wr #(
assign pre_done=rom_r[ENC_PRE_DONE] && gen_run;
assign rom_cmd= rom_r[ENC_CMD_SHIFT+:2]; // & {enable_act,1'b1}; // disable bit 1 if activate is disabled (not the first column)
assign rom_skip= rom_r[ENC_PAUSE_SHIFT+:2];
assign full_cmd= (enable_act && rom_cmd[1])?CMD_ACTIVATE:(rom_cmd[0]?CMD_WRITE:CMD_NOP);
assign full_cmd= (enable_act && rom_cmd[1]) ? CMD_ACTIVATE : (rom_cmd[0] ? CMD_WRITE : CMD_NOP);
assign last_row= (scan_row==num_rows_m1);
assign enable_act= first_col || !keep_open; // TODO: do not forget to zero addresses too (or they will become pause/done)
......
......@@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
`timescale 1ns/1ps
`include "system_defines.vh"
module mcntrl393 #(
// AXI
parameter MCONTR_WR_MASK = 'h3c00, // AXI write address mask for the 1Kx32 buffers command sequence memory
......@@ -994,6 +994,7 @@ module mcntrl393 #(
.xfer_page_rst_wr (xfer_reset_page3_wr), // output
.xfer_page_rst_rd (xfer_reset_page3_rd) // output
);
mcntrl_tiled_rw #(
.ADDRESS_NUMBER (ADDRESS_NUMBER),
.COLADDR_NUMBER (COLADDR_NUMBER),
......@@ -1010,7 +1011,7 @@ module mcntrl393 #(
.MCNTRL_TILED_WINDOW_WH (MCNTRL_TILED_WINDOW_WH),
.MCNTRL_TILED_WINDOW_X0Y0 (MCNTRL_TILED_WINDOW_X0Y0),
.MCNTRL_TILED_WINDOW_STARTXY (MCNTRL_TILED_WINDOW_STARTXY),
.MCNTRL_TILED_TILE_WHS (MCNTRL_TILED_TILE_WHS),
.MCNTRL_TILED_TILE_WHS (MCNTRL_TILED_TILE_WHS),
.MCNTRL_TILED_STATUS_REG_ADDR (MCNTRL_TILED_STATUS_REG_CHN2_ADDR),
.MCNTRL_TILED_PENDING_CNTR_BITS(MCNTRL_TILED_PENDING_CNTR_BITS),
.MCNTRL_TILED_FRAME_PAGE_RESET (MCNTRL_TILED_FRAME_PAGE_RESET)
......
......@@ -87,7 +87,10 @@ module mcntrl_linear_rw #(
reg [FRAME_HEIGHT_BITS:0] next_y; // (calculated) next row number
reg [NUM_RC_BURST_BITS-1:0] line_start_addr;// (calculated) Line start (in {row,col8} in burst8
// calculating full width from the frame width
reg [FRAME_HEIGHT_BITS-1:0] frame_y; // current line number referenced to the frame top
// WARNING: [Synth 8-3936] Found unconnected internal register 'frame_y_reg' and it is trimmed from '16' to '3' bits. [memctrl/mcntrl_linear_rw.v:268]
// Throblem seems to be that frame_y8_r_reg (load of trimmed bits of the frame_y_reg) is (as intended) absorbed into DSP48. The lower 3 bits are used
// outside of the DSP 48. "dont_touch" seems to work here
(* keep = "true" *) reg [FRAME_HEIGHT_BITS-1:0] frame_y; // current line number referenced to the frame top
reg [FRAME_WIDTH_BITS-1:0] frame_x; // current column number referenced to the frame left
reg [FRAME_HEIGHT_BITS-4:0] frame_y8_r; // (13 bits) current row with bank removed, latency2 (to be absorbed when inferred DSP multipler)
reg [FRAME_WIDTH_BITS:0] frame_full_width_r; // (14 bit) register to be absorbed by MPY
......
......@@ -20,6 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
`timescale 1ns/1ps
`include "system_defines.vh"
`undef DEBUG_FIFO
module mcntrl_ps_pio#(
parameter MCNTRL_PS_ADDR= 'h100,
......
......@@ -100,7 +100,10 @@ module mcntrl_tiled_rw#(
reg [NUM_RC_BURST_BITS-1:0] line_start_addr;// (calculated) Line start (in {row,col8} in burst8
reg [COLADDR_NUMBER-4:0] line_start_page_left; // number of 8-burst left in the memory page from the start of the frame line
// calculating full width from the frame width
reg [FRAME_HEIGHT_BITS-1:0] frame_y; // current line number referenced to the frame top
//WARNING: [Synth 8-3936] Found unconnected internal register 'frame_y_reg' and it is trimmed from '16' to '3' bits. [memctrl/mcntrl_tiled_rw.v:307]
// Throblem seems to be that frame_y8_r_reg (load of trimmed bits of the frame_y_reg) is (as intended) absorbed into DSP48. The lower 3 bits are used
// outside of the DSP 48. "dont_touch" seems to work here
(* keep = "true" *) reg [FRAME_HEIGHT_BITS-1:0] frame_y; // current line number referenced to the frame top
reg [FRAME_WIDTH_BITS-1:0] frame_x; // current column number referenced to the frame left
reg [FRAME_HEIGHT_BITS-4:0] frame_y8_r; // (13 bits) current row with bank removed, latency2 (to be absorbed when inferred DSP multipler)
reg [FRAME_WIDTH_BITS:0] frame_full_width_r; // (14 bit) register to be absorbed by MPY
......@@ -167,14 +170,15 @@ module mcntrl_tiled_rw#(
// wire msw13_zero=!(|cmd_data[FRAME_WIDTH_BITS+15:16]); // MSW 13 (FRAME_WIDTH_BITS) low bits are all 0 - set carry bit
wire msw_zero= !(|cmd_data[31:16]); // MSW all bits are 0 - set carry bit
wire tile_width_zero= !(|cmd_data[ 0+:MAX_TILE_WIDTH]);
wire tile_height_zero=!(|cmd_data[ 8+:MAX_TILE_HEIGHT]);
// wire tile_height_zero=!(|cmd_data[ 8+:MAX_TILE_HEIGHT]);
wire tile_vstep_zero= !(|cmd_data[16+:MAX_TILE_HEIGHT]);
// reg [5:0] mode_reg;//mode register: {write_mode,keep_open,extra_pages[1:0],enable,!reset}
reg [6:0] mode_reg;//mode register: {byte32,keep_open,extra_pages[1:0],write_mode,enable,!reset}
reg [NUM_RC_BURST_BITS-1:0] start_addr; // (programmed) Frame start (in {row,col8} in burst8, bank ==0
reg [MAX_TILE_WIDTH:0] tile_cols; // full number of columns in a tile
reg [MAX_TILE_HEIGHT:0] tile_rows; // full number of rows in a tile
// reg [MAX_TILE_HEIGHT:0] tile_rows; // full number of rows in a tile
reg [MAX_TILE_HEIGHT-1:0] tile_rows; // full number of rows in a tile
reg [MAX_TILE_HEIGHT:0] tile_vstep; // vertical step between rows of tiles
reg [MAX_TILE_WIDTH:0] num_cols_r; // full number of columns to transfer (not minus 1)
......@@ -227,7 +231,8 @@ module mcntrl_tiled_rw#(
tile_vstep <= 0;
end else if (set_tile_whs_w) begin
tile_cols <= {tile_width_zero, cmd_data[ 0+:MAX_TILE_WIDTH]};
tile_rows <= {tile_height_zero, cmd_data[ 8+:MAX_TILE_HEIGHT]};
// tile_rows <= {tile_height_zero, cmd_data[ 8+:MAX_TILE_HEIGHT]};
tile_rows <= { cmd_data[ 8+:MAX_TILE_HEIGHT]};
tile_vstep <= {tile_vstep_zero, cmd_data[16+:MAX_TILE_HEIGHT]};
end
......
......@@ -19,8 +19,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
`timescale 1ns/1ps
`include "system_defines.vh"
`define use200Mhz 1
`define DEBUG_FIFO 1
//`define DEBUG_FIFO 1
module memctrl16 #(
//command interface parameters
parameter DLY_LD = 'h080, // address to generate delay load
......@@ -604,6 +605,23 @@ wire rst=rst_in; // TODO: decide where toi generate
reg [15:0] chn_want_r;
wire [17:0] status_data;
wire [2:0] mcontr_0bit_addr;
wire mcontr_0bit_we;
wire [2:0] mcontr_16bit_addr;
// ???
// wire [15:0] aaaa;
// assign aaaa={cmd_ad,cmd_ad};// just debugging Vivado synth
wire [15:0] mcontr_16bit_data; // = {cmd_ad,cmd_ad};
// assign mcontr_16bit_data={cmd_ad,cmd_ad};// just debugging Vivado synth
wire mcontr_16bit_we;
// wire [15:0] aaaa;
// assign aaaa={cmd_ad,cmd_ad};// just debugging Vivado synth
assign status_data={chn_want_r,chn_need_some,chn_want_some};
// mux status info from the memory controller and other modules
......@@ -653,8 +671,6 @@ wire rst=rst_in; // TODO: decide where toi generate
);
// generate on/off dependent on lsb and 0-bit commands
wire [2:0] mcontr_0bit_addr;
wire mcontr_0bit_we;
cmd_deser #(
.ADDR (MCONTR_TOP_0BIT_ADDR),
.ADDR_MASK (MCONTR_TOP_0BIT_ADDR_MASK),
......@@ -680,10 +696,6 @@ wire rst=rst_in; // TODO: decide where toi generate
end
// generate 16-bit data commands (and set defaults to registers)
wire [2:0] mcontr_16bit_addr;
wire [15:0] mcontr_16bit_data;
wire mcontr_16bit_we;
cmd_deser #(
.ADDR (MCONTR_TOP_16BIT_ADDR),
.ADDR_MASK (MCONTR_TOP_16BIT_ADDR_MASK),
......@@ -699,14 +711,12 @@ wire rst=rst_in; // TODO: decide where toi generate
.data (mcontr_16bit_data), // output[31:0]
.we (mcontr_16bit_we) // output
);
wire set_chn_en_w;
wire set_refresh_period_w;
wire set_refresh_address_w;
reg set_refresh_period;
// wire control_status_we; // share with write delay (8-but)?
// wire [7:0] contral_status_data;
assign set_chn_en_w= mcontr_16bit_we && (mcontr_16bit_addr[2:0]==MCONTR_TOP_16BIT_CHN_EN);
assign set_refresh_period_w= mcontr_16bit_we && (mcontr_16bit_addr[2:0]==MCONTR_TOP_16BIT_REFRESH_PERIOD);
assign set_refresh_address_w= mcontr_16bit_we && (mcontr_16bit_addr[2:0]==MCONTR_TOP_16BIT_REFRESH_ADDRESS);
......@@ -758,10 +768,7 @@ wire rst=rst_in; // TODO: decide where toi generate
assign mcontr_enabled=mcontr_en && !mcontr_reset;
//assign sel_refresh_w= refresh_need || (refresh_want && (!cmd_seq_need || !(cmd_seq_full || (cmd_seq_fill && seq_set ))));
assign sel_refresh_w= refresh_need || (refresh_want && !(cmd_seq_need && cmd_seq_full));
//assign pre_run_seq_w= mcontr_enabled && !sequencer_run_busy && !refresh_grant && (cmd_seq_full || refresh_need || refresh_want);
//assign pre_run_seq_w= mcontr_enabled && !sequencer_run_busy && !refresh_grant && !cmd_seq_run && (cmd_seq_full || refresh_want);
assign pre_run_seq_w= mcontr_enabled && !sequencer_run_busy && !cmd_seq_run && (cmd_seq_full || refresh_want);
assign pre_run_chn_w= pre_run_seq_w && !sel_refresh_w;
......@@ -779,22 +786,14 @@ always @ (posedge rst or posedge mclk) begin
if (rst) cmd_wr_chn <= 0;
else if (grant) cmd_wr_chn <= grant_chn;
// if (rst) cmd_seq_fill <= 0;
// else if (!mcontr_enabled || pre_run_chn_w ) cmd_seq_fill <= 0;
// else if (grant) cmd_seq_fill <= 1;
//TODO: Modify,cmd_seq_fill was initially used to see if any sequaence data was written (or PS is used), now it is cmd_seq_set
if (rst) cmd_seq_fill <= 0;
// else if (!mcontr_enabled || seq_wr ) cmd_seq_fill <= 0;
// else if (grant) cmd_seq_fill <= 1;
// else if (!mcontr_enabled || grant ) cmd_seq_fill <= 0;
else if (!mcontr_enabled || seq_set || cmd_seq_full ) cmd_seq_fill <= 0;
// else if (seq_wr) cmd_seq_fill <= 1;
else if (grant) cmd_seq_fill <= 1;
if (rst) cmd_seq_full <= 0;
else if (!mcontr_enabled || pre_run_chn_w ) cmd_seq_full <= 0;
// else if (seq_wr) cmd_seq_full <= 1;
else if (seq_set) cmd_seq_full <= 1; // even with no data
......
......@@ -19,6 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
`timescale 1ns/1ps
`include "system_defines.vh"
// minimizing total DQS in delay to match DQ (finedelay stage adds some?)
//`define NOFINEDELAY_DQS 1
module byte_lane #(
......
......@@ -20,6 +20,7 @@
*******************************************************************************/
`timescale 1ns/1ps
// ISE 14.7 does not have OBUFT_DCIEN
`include "system_defines.vh"
`define USE_IOBUF 1
module dm_single #(
parameter IODELAY_GRP ="IODELAY_MEMORY",
......
......@@ -104,7 +104,8 @@ module scheduler16 #(
generate
genvar i1;
for (i1=0;i1<16;i1=i1+1) begin: sched_state_block
always @ (posedge rst or posedge clk) begin
// always @ (posedge rst or posedge clk) begin
always @ (posedge clk) begin
// if (rst) sched_state[width*i1 +: width] <= 0; // not needed?
// else
begin
......
// This file may be used to define same pre-processor macros to be included into each parsed file
`ifndef SYSTEM_DEFINES
`define SYSTEM_DEFINES
`define USE_CMD_ENCOD_TILED_32_RD 1
// It can be used to check different `ifdef branches
//`define XIL_TIMING //Simprim
`define den4096Mb 1
// `define IVERILOG
// defines for memory channels
// chn 0 is read from memory and write to memory
`define def_enable_mem_chn0
`define def_read_mem_chn0
`define def_write_mem_chn0
`undef def_scanline_chn0
`undef def_tiled_chn0
// chn 1 is scanline r+w
`define def_enable_mem_chn1
`define def_read_mem_chn1
`define def_write_mem_chn1