From f438fc615b829170679971110b5d1bb57fba6a86 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 21 Jul 2018 20:21:48 +0200 Subject: Added driver and users for nets --- ice40/bitstream.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ice40/bitstream.cc') diff --git a/ice40/bitstream.cc b/ice40/bitstream.cc index 8819a643..7fd3f8ac 100644 --- a/ice40/bitstream.cc +++ b/ice40/bitstream.cc @@ -767,6 +767,14 @@ bool read_asc(Context *ctx, std::istream &in) IdString name = ctx->getBoundWireNet(wire); if (name != IdString()) { port.second.net = ctx->nets[name].get(); + PortRef ref; + ref.cell = cell.second.get(); + ref.port = port.second.name; + + if (port.second.type == PORT_OUT) + ctx->nets[name]->driver = ref; + else + ctx->nets[name]->users.push_back(ref); } } } -- cgit v1.2.3