amaranth icon indicating copy to clipboard operation
amaranth copied to clipboard

Pin direction and XDR can be set even if there is not matching subsignal

Open jeanthom opened this issue 5 years ago • 1 comments

from nmigen import *
from nmigen_boards.ecpix5 import *

class Top(Elaboratable):
	def elaborate(self, platform):
		m = Module()

		ddr3 = platform.request("ddr3", 0, dir={"arrosoir":"-"},
			xdr={"chaise":4})

		return m

if __name__ == "__main__":
	top = Top()
	ECPIX585Platform().build(top)

The above code should at least trigger a warning.

jeanthom avatar Aug 03 '20 13:08 jeanthom

IIRC it is done this way because some resources have optional pins, and otherwise you wouldn't have any way to request XDR on a pin if it exists, skipping it otherwise. I agree that this is not ideal.

whitequark avatar Aug 03 '20 18:08 whitequark