Is it possible to define a UDP with more than one output? I even try to make bundle output as follow, but it makes some errors. I'm trying to write the code for an 8-bit prefix adder, and I want to define the operation as a UDP to calculate the value for G and P. This is the code:
primitive preaddprimitive(pgout,p2,p1,g2,g1);
input p2,p1,g2,g1;
output pgout;
table
// p2 p1 g2 g1 : {pout,gout}
0 ? 0 ? : 00;
? 0 1 ? : 01;
0 ? 1 ? : 01;
1 0 0 0 : 00;
1 0 0 1 : 01;
1 1 0 0 : 10;
1 1 0 1 : 11;
1 1 1 ? : 11;
endtable
endprimitive
and this is the error message:
near "0": syntax error, unexpected '0', expecting ';'
I tried to define to output, but it made the same error. I tested the code on modelsim 10.c.