diff --git a/tgt-vvp/draw_net_input.c b/tgt-vvp/draw_net_input.c index 6818d0f81..a379d7f76 100644 --- a/tgt-vvp/draw_net_input.c +++ b/tgt-vvp/draw_net_input.c @@ -672,6 +672,16 @@ static void draw_net_input_x(ivl_nexus_t nex, } *tmp++ = '>'; *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) { diff --git a/vvp/words.cc b/vvp/words.cc index a4a3686ab..3feabda69 100644 --- a/vvp/words.cc +++ b/vvp/words.cc @@ -290,12 +290,17 @@ static void __compile_net(char*label, assert(argc == 1); vvp_net_t*node = vvp_net_lookup(argv[0].text); +#if 1 if (node == 0) { /* No existing net, but the string value may be 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); } +#endif if (node == 0) { struct __vpiScope*scope = vpip_peek_current_scope(); __compile_net_resolv*res