OpenCores
Issue List
Testbench (Revision 125) #5
Closed nori5592 opened this issue over 14 years ago
nori5592 commented over 14 years ago

At the time of SD data reading, an FIFO error occurs when define SIM. This cause is because Wishbone Master Write and Read occurred at the same time. The point of the problem: ---SD_data_master.v, line:418-419--- rec_done<=1; start_tx_fifo<=1;

---Modify, line:418-419--- rec_done<=1; if(!rx_cycle) <---Add start_tx_fifo<=1;

On "2: Send CMD3, 48-bit Response, All Error check enable" test, a CRC error occurs and does a loop in a "while" sentence(line 2471). The point of the problem: ---SD_controller_top_tb.v, line:2364~2365--- sdModelTB0.add_wrong_cmd_crc<=1; sdModelTB0.add_wrong_cmd_indx<=1;

---Add, line:2442--- sdModelTB0.add_wrong_cmd_crc<=0; sdModelTB0.add_wrong_cmd_indx<=0;

tac2 commented over 14 years ago

Good spoted

However the 'SIM' define is obsolete it was a hack used in the old test bench in several places to circumvent the check of various card replays.SYN should always be used nowdays, this will be fixed later

The sdModelTB0.add_wrong_cmd_crc<=1; is used to test the error checking path. However is see some break is needed if a error is detected otherwise it get stuck there.

nori5592 commented over 14 years ago

How about this change? Line2471: while ((addr == SD_BASE +normal_isr) & tmp_data0 != 1 | (addr == SD_BASE +error_isr) & tmp_data3:0 != 4'b1x1x) begin

tac2 closed this about 14 years ago

Assignee
No one
Labels
Bug