Merge pull request #851 from galibert/master

mistral: Use the iterators
This commit is contained in:
gatecat 2021-10-19 22:06:18 +01:00 committed by GitHub
commit 840aee7e0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 13 deletions

View File

@ -21,7 +21,7 @@ jobs:
- name: Execute build nextpnr
env:
MISTRAL_PATH: ${{ github.workspace }}/deps/mistral
MISTRAL_REVISION: 8f78291541df10d70fde6c9c58765c437807c68d
MISTRAL_REVISION: 98ec7f69bfd5ab77e608ccd47ede988b45a7d99b
run: |
source ./.github/ci/build_mistral.sh
get_dependencies

View File

@ -81,18 +81,16 @@ Arch::Arch(ArchArgs args)
auto hps_pos = cyclonev->hps_get_pos();
if (!hps_pos.empty()) {
create_hps_mpu_general_purpose(CycloneV::pos2x(hps_pos[CycloneV::I_HPS_MPU_GENERAL_PURPOSE]), CycloneV::pos2y(hps_pos[CycloneV::I_HPS_MPU_GENERAL_PURPOSE]));
create_hps_mpu_general_purpose(CycloneV::pos2x(hps_pos[CycloneV::I_HPS_MPU_GENERAL_PURPOSE]),
CycloneV::pos2y(hps_pos[CycloneV::I_HPS_MPU_GENERAL_PURPOSE]));
}
// This import takes about 5s, perhaps long term we can speed it up, e.g. defer to Mistral more...
log_info("Initialising routing graph...\n");
int pip_count = 0;
for (const auto &mux : cyclonev->dest_node_to_rmux) {
const auto &rmux = cyclonev->rmux_info[mux.second];
WireId dst_wire(mux.first);
for (const auto &src : rmux.sources) {
if (CycloneV::rn2t(src) == CycloneV::NONE)
continue;
for (const auto &rnode : cyclonev->rnodes()) {
WireId dst_wire(rnode.id());
for (const auto &src : rnode.sources()) {
WireId src_wire(src);
wires[dst_wire].wires_uphill.push_back(src_wire);
wires[src_wire].wires_downhill.push_back(dst_wire);

View File

@ -45,18 +45,21 @@ bool Arch::is_clkbuf_cell(IdString cell_type) const
void Arch::create_hps_mpu_general_purpose(int x, int y)
{
BelId gp_bel = add_bel(x, y, id_cyclonev_hps_interface_mpu_general_purpose, id_cyclonev_hps_interface_mpu_general_purpose);
BelId gp_bel =
add_bel(x, y, id_cyclonev_hps_interface_mpu_general_purpose, id_cyclonev_hps_interface_mpu_general_purpose);
for (int i = 0; i < 32; i++) {
add_bel_pin(gp_bel, id(stringf("gp_in[%d]", i)), PORT_IN, get_port(CycloneV::HPS_MPU_GENERAL_PURPOSE, x, y, -1, CycloneV::GP_IN, i));
add_bel_pin(gp_bel, id(stringf("gp_out[%d]", i)), PORT_OUT, get_port(CycloneV::HPS_MPU_GENERAL_PURPOSE, x, y, -1, CycloneV::GP_OUT, i));
add_bel_pin(gp_bel, id(stringf("gp_in[%d]", i)), PORT_IN,
get_port(CycloneV::HPS_MPU_GENERAL_PURPOSE, x, y, -1, CycloneV::GP_IN, i));
add_bel_pin(gp_bel, id(stringf("gp_out[%d]", i)), PORT_OUT,
get_port(CycloneV::HPS_MPU_GENERAL_PURPOSE, x, y, -1, CycloneV::GP_OUT, i));
}
}
void Arch::create_control(int x, int y)
{
BelId oscillator_bel = add_bel(x, y, id_cyclonev_oscillator, id_cyclonev_oscillator);
add_bel_pin(oscillator_bel, id("oscena"), PORT_IN, get_port(CycloneV::CTRL, x, y, -1, CycloneV::OSC_ENA, -1));
add_bel_pin(oscillator_bel, id("clkout"), PORT_OUT, get_port(CycloneV::CTRL, x, y, -1, CycloneV::CLK_OUT, -1));
add_bel_pin(oscillator_bel, id("oscena"), PORT_IN, get_port(CycloneV::CTRL, x, y, -1, CycloneV::OSC_ENA, -1));
add_bel_pin(oscillator_bel, id("clkout"), PORT_OUT, get_port(CycloneV::CTRL, x, y, -1, CycloneV::CLK_OUT, -1));
add_bel_pin(oscillator_bel, id("clkout1"), PORT_OUT, get_port(CycloneV::CTRL, x, y, -1, CycloneV::CLK_OUT1, -1));
}