Re: Conversion error: Type mismatch with ear lier assignment

Josy Boelen <[email protected]>
Newsgroups gmane.comp.python.myhdl
Message-ID <[email protected]>
Hi Guy,

> I believe this has something to do with how name assignment works in 
Python. There's a section about this in the manual 
at http://docs.myhdl.org/en/stable/manual/conversion.html#intbv-objects
> 
> 
> My only criticism is that if you do it wrong (e.g. forget the "[:]"), 
you get an error message that is of little help to debug the issue.
> 

Thanks for pointing this out. I guess the error code could be extended to 
include "Did you forget [:]?" Assuming this error code only applies to 
exactly this case (it probably does).
I experimented a bit and found out I was wandering astray somewhat. 
Using an intbv assignment without the [:] would bind the name to another 
object. Using [:] avoids this and updates the actual intbv object itself.
Now I still am struggling a bit with the idea of having to use [:] on the 
LHS of the assignment especially as you don't have to when using an 
Augmented Assign (e.g. +=). 
I now also understand/recall avoiding this error by converting the 
arguments into integers in my code.

Regards,

Josy
------------------------------------------------------------------------------
_______________________________________________
myhdl-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/myhdl-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.