//-------------------------------------------------------------------------------------------------------- // Module : tb_ddr_sdram_ctrl // Type : simulation, top // Standard: Verilog 2001 (IEEE1364-2001) // Function: testbench for ddr_sdram_ctrl //-------------------------------------------------------------------------------------------------------- `timescale 1ps/1ps module tb_ddr_sdram_ctrl(); // ------------------------------------------------------------------------------------- // self test error signal, 1'b1 indicates error // ------------------------------------------------------------------------------------- wire error; // ----------------------------------------------------------------------------------------------------------------------------- // simulation control // ----------------------------------------------------------------------------------------------------------------------------- initial $dumpvars(0, tb_ddr_sdram_ctrl); initial begin #200000000; // simulation for 200us if(error) $display("*** Error: there are mismatch when read out and compare!!! see wave for detail."); else $display("validation successful !!"); $finish; end // ------------------------------------------------------------------------------------- // DDR-SDRAM parameters // ------------------------------------------------------------------------------------- localparam BA_BITS = 2; localparam ROW_BITS = 13; localparam COL_BITS = 11; localparam DQ_LEVEL = 1; localparam DQ_BITS = (4<