Changeset 206
- Timestamp:
- 20.11.2008 22:29:14 (2 months ago)
- Files:
-
- cores/hpdmc/rtl/hpdmc_rfifo.v (modified) (2 diffs)
- cores/hpdmc/rtl/hpdmc_scheduler.v (modified) (1 diff)
- cores/hpdmc/rtl/hpdmc_wfifo.v (modified) (3 diffs)
- cores/hpdmc/test/ddr.v (modified) (1 diff)
- cores/hpdmc/test/ddr_parameters.vh (modified) (1 diff)
- cores/hpdmc/test/tb_hpdmc.v (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cores/hpdmc/rtl/hpdmc_rfifo.v
r205 r206 56 56 end else begin 57 57 if(r_capture) begin 58 $display("write to the Read FIFO: %x -> %x [avail %x]", di, produce, data_available);59 58 storage[produce] = di; 60 59 produce = produce + 3'd1; … … 62 61 end 63 62 if(r_burst_start) begin 64 data_available = data_available + consume[1:0]- 4'd4;63 data_available = data_available + {2'b00, consume[1:0]} - 4'd4; 65 64 consume = {~consume[2], 2'b00}; 66 65 end else if(r_release) begin cores/hpdmc/rtl/hpdmc_scheduler.v
r205 r206 128 128 if(wb1_cyc_i & wb1_stb_i & (~mgmt_stb | mgmt_ack)) begin 129 129 register_mgmt = 1'b1; 130 reload_burst_counter = 1'b1; 130 131 if(wb1_we_i) begin 131 wb1_ack_o = 1'b1;132 wb1_ack_o = #0.5 1'b1; 132 133 w_burst_start = 1'b1; 133 reload_burst_counter = 1'b1;134 134 if(burst_on) 135 135 next_state = WRITEBURST; cores/hpdmc/rtl/hpdmc_wfifo.v
r205 r206 55 55 storage_mask[3] = 8'hff; 56 56 storage_data[0] = di; 57 $display("FIFO write (start): %x -> 0", di); 57 58 end else begin 58 59 storage_mask[4] = mi; … … 61 62 storage_mask[7] = 8'hff; 62 63 storage_data[4] = di; 64 $display("FIFO write (start): %x -> 4", di); 63 65 end 64 66 produce = {~produce[2], 2'b01}; … … 66 68 available_words = {available_words[3:2] - 2'b1, available_words[1:0]}; 67 69 end else if(w_capture) begin 70 $display("FIFO write (cont): %x -> %x", di, produce); 68 71 storage_mask[produce] = mi; 69 72 storage_data[produce] = di; cores/hpdmc/test/ddr.v
r150 r206 165 165 `endif 166 166 167 // added by lekernel: for testing reads before testing writes168 /*integer fillmem_i;169 initial begin170 for(fillmem_i=0;fillmem_i<4000;fillmem_i=fillmem_i+1) begin171 mem_array[fillmem_i] = $random;172 end173 end*/174 175 167 // Dqs edge checking 176 168 integer i; cores/hpdmc/test/ddr_parameters.vh
r150 r206 141 141 parameter no_halt = 1; // If set to 1, the model won't halt on command sequence/major errors 142 142 parameter DEBUG = 1; // Turn on DEBUG message 143 144 `define FULL_MEMcores/hpdmc/test/tb_hpdmc.v
r205 r206 262 262 integer i; 263 263 begin 264 #1; 264 265 wb_adr_i = address; 265 266 wb_dat_i = data; … … 270 271 wb_cti_i = 3'b000; 271 272 i = 0; 272 #1;273 273 while(~wb_ack_o) begin 274 274 i = i+1; … … 287 287 integer i; 288 288 begin 289 #1; 289 290 wb_adr_i = address; 290 291 wb_cyc_i = 1'b1; … … 295 296 wb_cti_i = 3'b010; 296 297 i = 0; 297 #1;298 298 while(~wb_ack_o) begin 299 299 i = i+1; 300 300 waitclock; 301 301 end 302 if(i == 0) waitclock;303 302 $display("Memory Write : %x=%x acked in %d clocks", address, wb_dat_i, i); 304 303 for(i=0;i<3;i=i+1) begin … … 418 417 waitnclock(200); 419 418 420 /* SDRAM initialization complete. 421 * Now, disable Bypass mode and bring up the hardware controller. 422 */ 423 424 /* We want to know what it sends to the SDRAM chips */ 419 /* SDRAM initialization completed */ 420 421 /* Now, we want to know what the controller will send to the SDRAM chips */ 425 422 $dumpvars(0, dut); 426 423 424 /* Bring up the controller ! */ 427 425 wbcwrite(32'h00, 32'h04); 428 426 waitnclock(30); … … 431 429 * Try some transfers. 432 430 */ 433 /* 431 wbwrite(32'h00000000, 64'h1111222233334444); 432 wbwriteburst(32'h00); 433 //wbwriteburst(32'h20); 434 //wbwriteburst(32'h40); 435 434 436 wbreadburst(32'h00); 435 wbreadburst(32'h00001020); 436 wbreadburst(32'h40); 437 wbreadburst(32'h60);*/ 438 439 //wbwrite(32'h00000000, 64'h1111222233334444); 440 441 wbwriteburst(32'h00); 442 wbwriteburst(32'h20); 443 wbwriteburst(32'h40); 444 /*wbwriteburst(32'h40); 445 wbwriteburst(32'h12340); 446 wbwriteburst(32'h12360); 447 wbreadburst(32'h00);*/ 437 //wbreadburst(32'h20); 438 //wbreadburst(32'h40); 448 439 waitnclock(20); 449 wbreadburst(32'h00);450 wbreadburst(32'h20);451 wbreadburst(32'h40);452 waitnclock(20);453 440 454 441 $finish;
