From 206bb0750608b65ff241f32bbf3e609ea307825a Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Thu, 14 Oct 2021 17:04:32 +0200 Subject: mistral: Add support for cyclonev_hps_interface_mpu_general_purpose --- mistral/globals.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mistral/globals.cc') diff --git a/mistral/globals.cc b/mistral/globals.cc index 3203893b..cf0f556c 100644 --- a/mistral/globals.cc +++ b/mistral/globals.cc @@ -43,4 +43,13 @@ bool Arch::is_clkbuf_cell(IdString cell_type) const return cell_type == id_MISTRAL_CLKENA || cell_type == id_MISTRAL_CLKBUF; } +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")); + 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)); + } +} + NEXTPNR_NAMESPACE_END -- cgit v1.2.3