Bug in Hardware Simulator

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug in Hardware Simulator

Garrison
I worked through all the projects of Chapter 3 except the Program Counter.  All chips passed and I moved to the PC.  While working on the PC I kept running into the error:
"This chip has a circle in its parts connections"

After banging my head against a wall and working through all my logic it appeared to me as though I had it correct.  I went online and downloaded a few other peoples solutions who claimed to have completed it, and copy and pasted their solutions in to my PC code.  I would get the same response.  I determined it was a call to Register(in=xx,load=true,out=xx,out=out); that was the "circle."

Of course I wanted this to be a circle much like is used to make a bit using the DFF chip.  Reading the appendix it seemed to me that the register chip should be treated like a clocked chip since it contains bits which contain dff's which are clocked.  However the error seemed to speak otherwise.  I hypothesized that the recursive check on clocked chips wasn't working so I removed the register chip from my directory to enable the builtin register chip.  Behold the online solutions as well as my own worked.

The bug seems to be that the hardware sim is not checking recursively for the clocked chip status as described.
Reply | Threaded
Open this post in threaded view
|

Re: Bug in Hardware Simulator

cadet1620
Administrator
This is very unlikely to be a simulator bug; nobody else is experiencing it.

The most likely cause is a defect in your Register.hdl.  You can test your PC in isolation by creating a subdirectory and copying only the PC.* files into the subdirectory and test it there.  That ensures that the builtin part for Register is used. Once PC is passing the test, copy Register.* into the subdirectory and test again.  If it fails the problem is in Register.  If it passes the problem is probably in Bit.

--Mark