cornell-brg / pymtl

Python-based hardware modeling framework
BSD 3-Clause "New" or "Revised" License
235 stars 82 forks source link

pymtl does check ".value" for single level Wire/OutPort but doesn't for the second level within message type #162

Open jsn1993 opened 7 years ago

jsn1993 commented 7 years ago
a = Wire( 1 ) 

s.a = 1
PyMTLError: Attempting to write a(n) Wire without .value!

2.

a = OutPort( 1 )

s.a = 1
PyMTLError: Attempting to write a(n) OutPort without .value!
a = Wire( MemReqMsg(8,32,32) ) 

s.a.data = 1
Pymtl doesn't complain but it should.
s.a = 1 
PyMTLError: Attempting to write a(n) Wire without .value!

4.

a = OutPort( MemReqMsg(8,32,32) )

s.a.data = 1
Pymtl doesn't complain but it should.

Probably because of the lack of enough lowering ...