|
From: Martin W. <mai...@ma...> - 2016-02-23 08:36:52
|
Martin Whitaker wrote: > Cary R. wrote: >> I can confirm that this does fail using both V10 and development.I'm >> guessing it has something to do with the constant function code and the >> SystemVerilog type or operators. I do not have time to look at this right >> now. This looks like valid code and is likely a problem in Icarus so not >> something that is easy for an end user to debug. If you feel adventurous >> then look at the constant function code in the compiler (eval_tree.cc, >> etc.) and add appropriate debug output to see what is going on. Cary > > Yes, running with the -deval_tree debugging option shows that all the SV > merged operator/assignments (++, --, >>=) don't work in a constant context. > I've pushed a fix for this to both the devel and v10 branches. I've tested basic operation, but not explored mixing types, sizes, part selects, etc. Not currently supported are: - assignment to concatenations - increment/decrement operators inside expressions Operation on real operands is implemented but not tested, because tgt-vvp doesn't currently support this either. Martin |