Not getting output

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Not getting output

Thorvald
This post was updated on .
I am trying to implement the PC chip but I am not getting the output,
the last step in my implementations just gives me 0 always, although I know
I am feeding the correct value.

   [My chip implementation]

In the Hardwaresim, when in=0, reset=load=0, inc=1, I have my internal pins as

toinc[16] 0
incremented[16] 1
notinc[16] 0
dummy[16] 1
toreset[16] 1
toregister[16] 1

So I must have a 1 at the exit, what I am missing?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Not getting output

ybakos
Thorvald, could you clarify your question? Your implementation is valid and passes the test. What do you feel is wrong?

Also, could you please remove your HDL from your forum post? We try to keep those off of the form.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Not getting output

Thorvald
Hi ybakos. My implementation does not passes the test in my Hardware simulation.
It raises an exception: "Comparison failure at line 5".

This is my output:

| time |   in   |reset|load | inc |  out   |
| 0+   |      0 |  0  |  0  |  0  |      0 |
| 1     |      0 |  0  |  0  |  0  |      0 |
| 1+   |      0 |  0  |  0  |  1  |      0 |
| 2     |      0 |  0  |  0  |  1  |      0 | <------ This is the wrong output


(Sorry for posting my code, I know the philosophy of the forum, but I have been struggling
with this for a day. I will remove the code as soon as we fix it).
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Not getting output

cadet1620
Administrator
This problem—when a chip passes for other people but not for you—typically happens when one of the parts that your chip depends upon is broken or not implemented in your directory.

In this case, make sure that you don't have Inc16 or Mux16 HDL files in your projects/03/a directory so that the simulator will use the built-in versions, and you have a working Register.hdl in that directory.

You can also test your PC in isolation by making a directory like projects/03/a/test and copying all the PC files into that directory.

--Mark
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Not getting output

Thorvald
That was the problem. I moved from mi pc to mi laptop and there I didn't have implemented the Register.hdl. Renaming it and running again the test makes the program to look for the Register built-in. Thanks!!
Loading...