blif target supports wide LPM_PART_VP devices.
This commit is contained in:
parent
15cda5fef2
commit
9b3987bf3c
|
|
@ -40,8 +40,7 @@ int print_lpm_part_vp(FILE*fd, ivl_lpm_t net)
|
||||||
ivl_nexus_t nex_out = ivl_lpm_q(net);
|
ivl_nexus_t nex_out = ivl_lpm_q(net);
|
||||||
blif_nex_data_t*ned_out = blif_nex_data_t::get_nex_data(nex_out);
|
blif_nex_data_t*ned_out = blif_nex_data_t::get_nex_data(nex_out);
|
||||||
|
|
||||||
// Only handle bit selects.
|
assert(ivl_lpm_width(net) == ned_out->get_width());
|
||||||
assert(ned_out->get_width() == 1);
|
|
||||||
// Only handle constant part select base.
|
// Only handle constant part select base.
|
||||||
assert(ivl_lpm_data(net,1) == 0);
|
assert(ivl_lpm_data(net,1) == 0);
|
||||||
|
|
||||||
|
|
@ -52,10 +51,12 @@ int print_lpm_part_vp(FILE*fd, ivl_lpm_t net)
|
||||||
|
|
||||||
assert(bit_sel < ned_in->get_width());
|
assert(bit_sel < ned_in->get_width());
|
||||||
|
|
||||||
fprintf(fd, ".names %s%s %s%s # %s:%u\n1 1\n",
|
for (unsigned idx = 0 ; idx < ivl_lpm_width(net) ; idx += 1) {
|
||||||
ned_in->get_name(), ned_in->get_name_index(bit_sel),
|
fprintf(fd, ".names %s%s %s%s # %s:%u\n1 1\n",
|
||||||
ned_out->get_name(), ned_out->get_name_index(0),
|
ned_in->get_name(), ned_in->get_name_index(bit_sel+idx),
|
||||||
ivl_lpm_file(net), ivl_lpm_lineno(net));
|
ned_out->get_name(), ned_out->get_name_index(idx),
|
||||||
|
ivl_lpm_file(net), ivl_lpm_lineno(net));
|
||||||
|
}
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,8 @@ const char* blif_nex_data_t::get_name_index(unsigned bit)
|
||||||
*/
|
*/
|
||||||
size_t blif_nex_data_t::get_width(void)
|
size_t blif_nex_data_t::get_width(void)
|
||||||
{
|
{
|
||||||
|
if (name_==0) select_name_();
|
||||||
|
|
||||||
// Special case: If the nexus width is 1 bit, then there is no
|
// Special case: If the nexus width is 1 bit, then there is no
|
||||||
// need for index_name maps, so the name_index_ will be empty.
|
// need for index_name maps, so the name_index_ will be empty.
|
||||||
if (name_index_.size()==0)
|
if (name_index_.size()==0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue