How does --warn-resources work on the simulator? Topic is solved

If you have a simple question and just want an answer.
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

How does --warn-resources work on the simulator?

Post by sethu_jangala »



View Solution
User avatar
sethu_jangala
XCore Expert
Posts: 589
Joined: Wed Feb 29, 2012 10:03 am

Post by sethu_jangala »

The following command line example shows how sampling a buffered port at a slow rate produces some "tReg full" warnings:

$ cat a.xc
#include
in buffered port:1 p = XS1_PORT_1A;
int main()
{
p :> int;
p :> int;
return 0;
}
$ xcc -target=XS1-L1A-LQ64 sim.xc
$ xsim --warn-resources --debug-ports -t a.xe | \
grep -ePORT12 -elost -emain | \
grep -ePosEdge\ 1 -etRegFull -elost -e'main.*: in' | \
grep 'main.*: in' -A30 -m1 | \
sed 's/.*\(tReg 0x., tRegFull .\).*/\1/' | \
sed 's/.*\(clkBlkPosEdge 1\).*/\1/' | \
sed 's/.*: in.*/in ---/'
in ---
tReg 0x0, tRegFull 0
clkBlkPosEdge 1
tReg 0x0, tRegFull 0
tReg 0x0, tRegFull 1
tReg 0x0, tRegFull 1
tReg 0x0, tRegFull 1
clkBlkPosEdge 1
PORT 0x00010200: Full tReg lost
tReg 0x0, tRegFull 1
tReg 0x0, tRegFull 1
tReg 0x0, tRegFull 1
tReg 0x0, tRegFull 1
clkBlkPosEdge 1
PORT 0x00010200: Full tReg lost
tReg 0x0, tRegFull 1
tReg 0x0, tRegFull 1
tReg 0x0, tRegFull 1
tReg 0x0, tRegFull 1
clkBlkPosEdge 1
PORT 0x00010200: Full tReg lost
tReg 0x0, tRegFull 1
tReg 0x0, tRegFull 1
tReg 0x0, tRegFull 1
tReg 0x0, tRegFull 1
clkBlkPosEdge 1
PORT 0x00010200: Full tReg lost
tReg 0x0, tRegFull 1
tReg 0x0, tRegFull 1
tReg 0x0, tRegFull 0