Add driver for the HiZ of open nets.
Even open nets have a driver for HiZ. The BUFZ is needed as something to hang .net objects. This is another step closer to not needing the "create_constant_node" hack in vvp/words.cc.
This commit is contained in:
parent
8247d3ef45
commit
9164b7719b
|
|
@ -672,6 +672,16 @@ static void draw_net_input_x(ivl_nexus_t nex,
|
||||||
}
|
}
|
||||||
*tmp++ = '>';
|
*tmp++ = '>';
|
||||||
*tmp = 0;
|
*tmp = 0;
|
||||||
|
|
||||||
|
/* Create an "open" driver to hold the HiZ. We
|
||||||
|
need to do this so that .nets have something to
|
||||||
|
hang onto. */
|
||||||
|
char buf[64];
|
||||||
|
snprintf(buf, sizeof buf, "o%p", nex);
|
||||||
|
fprintf(vvp_out, "%s .functor BUFZ %u, %s; HiZ drive\n",
|
||||||
|
buf, wid, nex_private);
|
||||||
|
nex_private = realloc(nex_private, strlen(buf)+1);
|
||||||
|
strcpy(nex_private, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (island) {
|
if (island) {
|
||||||
|
|
|
||||||
|
|
@ -290,12 +290,17 @@ static void __compile_net(char*label,
|
||||||
|
|
||||||
assert(argc == 1);
|
assert(argc == 1);
|
||||||
vvp_net_t*node = vvp_net_lookup(argv[0].text);
|
vvp_net_t*node = vvp_net_lookup(argv[0].text);
|
||||||
|
#if 1
|
||||||
if (node == 0) {
|
if (node == 0) {
|
||||||
/* No existing net, but the string value may be a
|
/* No existing net, but the string value may be a
|
||||||
constant. In that case, we will wind up generating a
|
constant. In that case, we will wind up generating a
|
||||||
bufz node that can carry the constant value. */
|
bufz node that can carry the constant value.
|
||||||
|
|
||||||
|
NOTE: This is a hack! The code generator should be
|
||||||
|
fixed so that this is no longer needed. */
|
||||||
node = create_constant_node(label, argv[0].text);
|
node = create_constant_node(label, argv[0].text);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (node == 0) {
|
if (node == 0) {
|
||||||
struct __vpiScope*scope = vpip_peek_current_scope();
|
struct __vpiScope*scope = vpip_peek_current_scope();
|
||||||
__compile_net_resolv*res
|
__compile_net_resolv*res
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue