Merge pull request #1256 from fjullien/mipi_rx

efinix: add MIPI RX controller in ifacewriter
This commit is contained in:
enjoy-digital 2022-03-29 14:31:05 +02:00 committed by GitHub
commit 9be3951be9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,6 +135,21 @@ design.create("{2}", "{3}", "./../gateware", overwrite=True)
cmd += "# ---------- END MIPI TX {} ---------\n\n".format(name)
return cmd
def generate_mipi_rx(self, block, verbose=True):
name = block["name"]
conn_type = ""
if "conn_type" in block:
conn_type = f', conn_type="{block["conn_type"]}"'
cmd = "# ---------- MIPI RX {} ---------\n".format(name)
cmd += f'design.create_block("{name}","MIPI_RX_LANE", mode="{block["mode"]}"' + conn_type + ')\n'
for p, v in block["props"].items():
cmd += f'design.set_property("{name}","{p}","{v}","MIPI_RX_LANE")\n'
cmd += f'design.assign_resource("{name}","{block["ressource"]}","MIPI_RX_LANE")\n'
cmd += "# ---------- END MIPI RX {} ---------\n\n".format(name)
return cmd
def generate_gpio(self, block, verbose=True):
name = block["name"]
mode = block["mode"]
@ -301,6 +316,8 @@ design.create("{2}", "{3}", "./../gateware", overwrite=True)
output += self.generate_gpio(block)
if block["type"] == "MIPI_TX_LANE":
output += self.generate_mipi_tx(block)
if block["type"] == "MIPI_RX_LANE":
output += self.generate_mipi_rx(block)
return output
def footer(self):