diff options
author | gatecat <gatecat@ds0.me> | 2022-04-07 18:43:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-07 18:43:25 +0100 |
commit | e42e22575f20b59634f88b5cf694efdb413ff0a0 (patch) | |
tree | dd1c201207b2b17f28cdcc1919f8ab160f718973 /ecp5/gfx.cc | |
parent | d5ec421d988b92d1f610d6a031381a999b3f901c (diff) | |
parent | efb58711b0dfcdb8080f63bd64d3f9d9fafd2637 (diff) | |
download | nextpnr-e42e22575f20b59634f88b5cf694efdb413ff0a0.tar.gz nextpnr-e42e22575f20b59634f88b5cf694efdb413ff0a0.tar.bz2 nextpnr-e42e22575f20b59634f88b5cf694efdb413ff0a0.zip |
Merge pull request #972 from YosysHQ/gatecat/ecp5-split-slice-v2
ecp5: Split the SLICE bel into separate LUT/FF/RAMW bels
Diffstat (limited to 'ecp5/gfx.cc')
-rw-r--r-- | ecp5/gfx.cc | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/ecp5/gfx.cc b/ecp5/gfx.cc index 8b5015f8..fe206de0 100644 --- a/ecp5/gfx.cc +++ b/ecp5/gfx.cc @@ -23,11 +23,13 @@ NEXTPNR_NAMESPACE_BEGIN const float slice_x1 = 0.92; +const float slice_x2_comb = 0.927; +const float slice_x1_ff = 0.933; const float slice_x2 = 0.94; const float slice_x2_wide = 0.97; const float slice_y1 = 0.71; -const float slice_y2 = 0.745 + 0.0068; -const float slice_pitch = 0.0374 + 0.0068; +const float slice_y2 = 0.7275 + 0.0068 / 2; +const float slice_pitch = (0.0374 + 0.0068) / 2; const float io_cell_v_x1 = 0.76; const float io_cell_v_x2 = 0.95; @@ -54,11 +56,25 @@ void gfxTileBel(std::vector<GraphicElement> &g, int x, int y, int z, int w, int GraphicElement el; el.type = GraphicElement::TYPE_BOX; el.style = style; - if (bel_type == id_TRELLIS_SLICE) { + if (bel_type == id_TRELLIS_COMB) { el.x1 = x + slice_x1; + el.x2 = x + slice_x2_comb; + el.y1 = y + slice_y1 + (z >> Arch::lc_idx_shift) * slice_pitch; + el.y2 = y + slice_y2 + (z >> Arch::lc_idx_shift) * slice_pitch; + g.push_back(el); + + el.style = GraphicElement::STYLE_FRAME; + el.x1 = x + slice_x2_comb + 15 * wire_distance; + el.x2 = el.x1 + wire_distance; + el.y1 = y + slice_y2 - wire_distance * (TILE_WIRE_CLK3_SLICE - TILE_WIRE_DUMMY_D2 + 5 + (3 - z) * 26) + + 3 * slice_pitch - 0.0007f; + el.y2 = el.y1 + wire_distance * 5; + g.push_back(el); + } else if (bel_type == id_TRELLIS_FF) { + el.x1 = x + slice_x1_ff; el.x2 = x + slice_x2; - el.y1 = y + slice_y1 + (z)*slice_pitch; - el.y2 = y + slice_y2 + (z)*slice_pitch; + el.y1 = y + slice_y1 + (z >> Arch::lc_idx_shift) * slice_pitch; + el.y2 = y + slice_y2 + (z >> Arch::lc_idx_shift) * slice_pitch; g.push_back(el); el.style = GraphicElement::STYLE_FRAME; |