outM, Mux and D register: Can't connect gate's output pin to part

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

outM, Mux and D register: Can't connect gate's output pin to part

Kovacsics Robert
Hi!

I encounter the problem "Can't connect gate's output pin to part" between the outM, the mux16 that goes into the A register and between the D register. However, figure 5.9 says so, and I think it should be like so, because there are clocked components (A and D register) that stop it being a data race.

[edit]
PS: I am not sure, but I recall it working without changing code at some point. Perhaps because I have upgraded to JRE 7u7, but not sure. I will try with JRE 6, but that might not be the problem. If it solves it, I will reply so.

[edit] It does not works with JRE 6u35
Reply | Threaded
Open this post in threaded view
|

Re: outM, Mux and D register: Can't connect gate's output pin to part

cadet1620
Administrator
This is like the feedback signal in the Bit.  You need to connect the ALU's output to both outM and an internal signal that can be used to feed the Mux and D-reg.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: outM, Mux and D register: Can't connect gate's output pin to part

Kovacsics Robert
If I understand you correctly, you mean that I should have the ALU feeding outM and the inputs to the A (the Mux for it) and D registers, but I have this. The problem is if I see it correctly is that the simulator looks at it as a loop despite the clocked register components.
Reply | Threaded
Open this post in threaded view
|

Re: outM, Mux and D register: Can't connect gate's output pin to part

cadet1620
Administrator
CHIP test
{
    IN a, b;
    OUT x, out;
    PARTS:
    Not(in=x, out=out);
}
"In HDL file C:\...\test.hdl, Line 6, Can't connect gates output pin to part"
This message comes from the "in=x" connection in the Not gate.  You cannot take a pin that is declared in the OUT statement and hook it to a part input.

If you have unclocked feedback you will get the message "This chip has a circle in its parts connections".

How did you solve this problem in your Bit.hdl?  The output of the DFF is connected to a Mux input.

(In case you missed it, you can have more than one "out=" connection on a part.  Some people don't see this and end up using extra Not gates to get an internal signal that can be used for feedback:
    DFF(... out=muxIn);
    Not(in=muxIn, out=notOut);
    Not(in=notOut, out=out);
rather than
    DFF(... out=muxIn, out=out);

If you are doing all this and still having problems, feel free to email me your ALU and I'll let you know what I see.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: outM, Mux and D register: Can't connect gate's output pin to part

Kovacsics Robert
Ah, with you now, thank you (and I understand what you meant in the first post, thanks for explaining it in a different way)!
I did do this in the Bit, but it was more by accident , so I did not realise it would solve my problem.

Thank you!