iverilog: possibility of NetPartSelect(PV) with variable bas

J

Johann Klammer

Guest
Hello,

Is there any way to get NetPartSelect(PV) primitives in the netlist with
/variable/ base in icarus verilog?
What kind of code fragment would produce those?

br918a.v and similar from the test suite[1] only produce part-to-vectors
with constant selects(cont. assignments, lvalues). Can I rely on this,
or is there a syntactically legal way to specify a variable select on an
lvalue? (I tried but get errors.. and my verilog skills are pretty thin,
too)

I am asking because the other way around (NetPartSelect(VP), rvalues)
/can/ have variable base as in pr2835632b.v
(the ones with a+/a-)

[1]https://github.com/steveicarus/ivtest

Many thanks
 
You be able to create non-constant base values with NetPartSelect(PV).
This object is created for things like this:

assign foo[idx] = bar;

where idx is non-constant, and also as a result of synthesis
for behavioral code like this:

...
foo[idx] = bar;
...

NOTE 1: Synthesis is "not supported". There has been some recent
movement on synthesis support, but mostly for statistics/linting
and not actual practical synthesis.

NOTE 2: This particular discussion is VERY Icarus Verilog specific
and may be better held on the iverilog-devel mailing list.
(I think it is OK to discuss Icarus Verilog on c.l.v, but the
development internals maybe less so.)


On 05/25/2014 11:06 PM, Johann Klammer wrote:
Hello,

Is there any way to get NetPartSelect(PV) primitives in the netlist with
/variable/ base in icarus verilog?
What kind of code fragment would produce those?

br918a.v and similar from the test suite[1] only produce part-to-vectors
with constant selects(cont. assignments, lvalues). Can I rely on this,
or is there a syntactically legal way to specify a variable select on an
lvalue? (I tried but get errors.. and my verilog skills are pretty thin,
too)

I am asking because the other way around (NetPartSelect(VP), rvalues)
/can/ have variable base as in pr2835632b.v
(the ones with a+/a-)

[1]https://github.com/steveicarus/ivtest

Many thanks

--
Steve Williams "The woods are lovely, dark and deep.
steve at icarus.com But I have promises to keep,
http://www.icarus.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."
 
On 05/26/2014 08:28 PM, Stephen Williams wrote:
You be able to create non-constant base values with NetPartSelect(PV).
This object is created for things like this:

assign foo[idx] = bar;

where idx is non-constant, and also as a result of synthesis
for behavioral code like this:

...
foo[idx] = bar;
...

putting something like this:
....
wire [3:0] w;
wire [3:0] b[15:0];

assign (pull1,strong0) b[w] = v1;
....
at the start of br918a.v gives error:

../br918a.v:11: error: array b index must be a constant in this context.

Line 11 is the assign
The iverilog version here is:
Icarus Verilog version 0.9.7 (v0_9_7)

NOTE 1: Synthesis is "not supported". There has been some recent
movement on synthesis support, but mostly for statistics/linting
and not actual practical synthesis.
Yes, I noticed...
The behavioral processes do not show up as components in the netlist(-N)
dump... and -S likes to fail assertions/gives warning etc..

NOTE 2: This particular discussion is VERY Icarus Verilog specific
and may be better held on the iverilog-devel mailing list.
(I think it is OK to discuss Icarus Verilog on c.l.v, but the
development internals maybe less so.)
Usually, I read those lists on gmane, but they don't seem to mirror
iverilog-devel(I was being lazy).
 

Welcome to EDABoard.com

Sponsor

Back
Top