OpenCores

The openrisc bugtracker has been moved to: bugzilla.opencores.org. This page is read-only

eror in or1200_defines at orpsocv2

Back to bugtracker overview.

Information:
Type :: BUG
Status :: CLOSED
Assigned to :: Julius, Baxter

Description:

Default or1200_defines.v have some error

//Number of DVR/DCR pairs if HW breakpoints enabled
OR1200_DU_DVRDCR_PAIRS is defined 8, and they have 8 pairs of DVR/DCR

But, the OR1200_DCFGR_NDP is reserved 3bits, therefore NDP bits in Debug configuration register is set to 3'b000


--------------------------------------------------------------------
file: rtl/or1200r2/or1200_cfgr.v
spr_dat_o[`OR1200_DCFGR_NDP_BITS] = `OR1200_DCFGR_NDP;
|
bit overflow during conversion from text [2.5(IEEE)] (3 bits).
`define macro: OR1200_DU_DVRDCR_PAIRS = 8 [or1200_defines.v],
`define macro: OR1200_DCFGR_NDP = 3'b`OR1200_DU_DVRDCR_PAIRS [or1200_defines.v],

Comments:

Baxter, Julius Jan 23, 2010
Yes, this is incorrect in the implementation.

According to the OpenRISC architecture spec, the NDP field of the DCFGR indicates:

Number of Debug Pairs
0 Debug unit has one DCR/DVR pair
...
7 Debug unit has eight DCR/DVR pairs

in the or1200_defines.v file we have

`define OR1200_DU_DVRDCR_PAIRS 8

and then

`ifdef OR1200_DU_HWBKPTS
`define OR1200_DCFGR_NDP 3'h`OR1200_DU_DVRDCR_PAIRS // # of DVR/DCR pairs

OR1200_DU_DVRDCR_PAIRS is used nowhere else so I guess this was mistakenly set to 8 at some point. Attempting to `define OR1200_DCFGR_NDP as 3'h(8-1) doesn't work, so changing the OR1200_DU_DVRDCR_PAIRS to 7 is the best fix.

It has been fixed in ORPSoCv2 but remains in the or1200 project code for now.

Post a comment:
Login to post comments!

Back to bugtracker overview.

© copyright 1999-2012 OpenCores.org, equivalent to ORSoC AB, all rights reserved. OpenCores®, registered trademark.