Error in my ALU

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

Error in my ALU

Mosey
This post was updated on .
This is my alu. Can you tell me why it gives me an error message "Line 71 operated has no source pin"?

***REMOVED***
Reply | Threaded
Open this post in threaded view
|

Re: Error in my ALU

cadet1620
Administrator
mosey wrote
This is my alu. Can you tell me why it gives me an error message "Line 71 operated has no source pin"?
...    
    Not16 (in=operated, out=notoutput);
...
There is no part that has an output pin connected to 'operated'.

Please edit your post to remove the source code. We don't want to have complete solutions remain on the forum.

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

Re: Error in my ALU

gjs
I have an error which reads
"line 52, instruction has no source pin"
but there are only 51 lines of code.
Do you know why there is this error?
Reply | Threaded
Open this post in threaded view
|

Re: Error in my ALU

cadet1620
Administrator
gjs wrote
I have an error which reads
"line 52, instruction has no source pin"
but there are only 51 lines of code.
Do you know why there is this error?
Since it is legal to forward reference internal names, as in:
    SomePart (in=foo, ...);
    AnotherPart (..., out=foo);
the Hardware Simulator doesn't know that a name is undefined until it gets to the end of the file, thus it reports the line number at end-of-file.

The name in the error message tells you what is undefined. In your case, it's "instruction", which unfortunately makes the error message quite confusing since the errant name is not quoted.

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

Re: Error in my ALU

gjs
thanks Mark, i had a typo in the spelling of instruction.
I now have another error "unexpected end of file". I have checked to make sure the {} and () are in pairs but that has not solved it..any ideas please?
Reply | Threaded
Open this post in threaded view
|

Re: Error in my ALU

cadet1620
Administrator
Make sure that there is a blank line after the final '}'.  If you can't find the problem, feel free to mail me your code and I'll look at it.

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

Re: Error in my ALU

gjs
I have emailed you the hdl code. Any comments relating this particular error but not the code in general would be appreciated.
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Error in my ALU

cadet1620
Administrator
For other people who might be experiencing this problem, the unexpected end-of-file was being caused by an open /* comment.

--Mark