diff --git a/icebreaker/7seg_count/7seg_count.py b/icebreaker/7seg_count/7seg_count.py index 737fdba..f7f28f1 100755 --- a/icebreaker/7seg_count/7seg_count.py +++ b/icebreaker/7seg_count/7seg_count.py @@ -44,8 +44,8 @@ def elaborate(self, platform): m.submodules.tens_to_segs = self.tens_to_segs m.d.comb += [ - Cat([seg_pins.aa, seg_pins.ab, seg_pins.ac, seg_pins.ad, - seg_pins.ae, seg_pins.af, seg_pins.ag]).eq(seg_pins_cat), + Cat([seg_pins.aa.o, seg_pins.ab.o, seg_pins.ac.o, seg_pins.ad.o, + seg_pins.ae.o, seg_pins.af.o, seg_pins.ag.o]).eq(seg_pins_cat), ones_counter.eq(counter[21:25]), tens_counter.eq(counter[25:29]), display_state.eq(counter[2:5]), @@ -61,13 +61,13 @@ def elaborate(self, platform): with m.Case("010"): m.d.sync += seg_pins_cat.eq(0) with m.Case("011"): - m.d.sync += seg_pins.ca.eq(1) + m.d.sync += seg_pins.ca.o.eq(1) with m.Case("10-"): m.d.sync += seg_pins_cat.eq(self.tens_to_segs.segments) with m.Case("110"): m.d.sync += seg_pins_cat.eq(0) with m.Case("111"): - m.d.sync += seg_pins.ca.eq(0) + m.d.sync += seg_pins.ca.o.eq(0) return m diff --git a/icebreaker/blink/blink.py b/icebreaker/blink/blink.py index caf35c9..c739d8c 100755 --- a/icebreaker/blink/blink.py +++ b/icebreaker/blink/blink.py @@ -9,7 +9,7 @@ def __init__(self, maxperiod): self.maxperiod = maxperiod def elaborate(self, platform): - led = platform.request("led_r") + led = platform.request("led_r").o m = Module() diff --git a/icebreaker/rotary_encoder/rotary_encoder.py b/icebreaker/rotary_encoder/rotary_encoder.py index acbd7cd..b94e5bf 100755 --- a/icebreaker/rotary_encoder/rotary_encoder.py +++ b/icebreaker/rotary_encoder/rotary_encoder.py @@ -30,14 +30,14 @@ def __init__(self): def elaborate(self, platform): encoder_pins = platform.request("rotary_encoder") - red = platform.request("led_r", 0) - green = platform.request("led_g", 0) + red = platform.request("led_r", 0).o + green = platform.request("led_g", 0).o leds = Cat( # leds in ccw order - platform.request("led_g", 1), - platform.request("led_g", 4), - platform.request("led_g", 2), - platform.request("led_g", 3), + platform.request("led_g", 1).o, + platform.request("led_g", 4).o, + platform.request("led_g", 2).o, + platform.request("led_g", 3).o, ) m = Module() @@ -59,7 +59,7 @@ def elaborate(self, platform): m.d.sync += self.state.eq(Cat(self.state[1:], self.state[:1])) m.d.comb += [ - self.iq_to_step_dir.iq.eq(Cat(encoder_pins.in_phase, encoder_pins.quadrature)), + self.iq_to_step_dir.iq.eq(Cat(encoder_pins.in_phase.i, encoder_pins.quadrature.i)), leds.eq(self.state), ] diff --git a/icebreaker/uart/uart.py b/icebreaker/uart/uart.py index e1ae93d..03e3127 100755 --- a/icebreaker/uart/uart.py +++ b/icebreaker/uart/uart.py @@ -58,7 +58,7 @@ def elaborate(self, _platform: Platform) -> Module: self.rx_bitno = rx_bitno = Signal(3) with m.FSM(reset="IDLE") as self.rx_fsm: with m.State("IDLE"): - with m.If(~self.serial.rx): + with m.If(~self.serial.rx.i): m.d.sync += rx_counter.eq(self.divisor // 2) m.next = "START" @@ -70,7 +70,7 @@ def elaborate(self, _platform: Platform) -> Module: with m.If(self.rx_strobe): m.d.sync += [ self.rx_data.eq( - Cat(self.rx_data[1:8], self.serial.rx)), + Cat(self.rx_data[1:8], self.serial.rx.i)), rx_bitno.eq(rx_bitno + 1) ] with m.If(rx_bitno == 7): @@ -78,7 +78,7 @@ def elaborate(self, _platform: Platform) -> Module: with m.State("STOP"): with m.If(self.rx_strobe): - with m.If(~self.serial.rx): + with m.If(~self.serial.rx.i): m.next = "ERROR" with m.Else(): m.next = "FULL" @@ -87,7 +87,7 @@ def elaborate(self, _platform: Platform) -> Module: m.d.comb += self.rx_ready.eq(1) with m.If(self.rx_ack): m.next = "IDLE" - with m.Elif(~self.serial.rx): + with m.Elif(~self.serial.rx.i): m.next = "ERROR" with m.State("ERROR"): @@ -114,17 +114,17 @@ def elaborate(self, _platform: Platform) -> Module: ] m.next = "START" with m.Else(): - m.d.sync += self.serial.tx.eq(1) + m.d.sync += self.serial.tx.o.eq(1) with m.State("START"): with m.If(self.tx_strobe): - m.d.sync += self.serial.tx.eq(0) + m.d.sync += self.serial.tx.o.eq(0) m.next = "DATA" with m.State("DATA"): with m.If(self.tx_strobe): m.d.sync += [ - self.serial.tx.eq(tx_latch[0]), + self.serial.tx.o.eq(tx_latch[0]), tx_latch.eq(Cat(tx_latch[1:8], 0)), tx_bitno.eq(tx_bitno + 1) ] @@ -133,7 +133,7 @@ def elaborate(self, _platform: Platform) -> Module: with m.State("STOP"): with m.If(self.tx_strobe): - m.d.sync += self.serial.tx.eq(1) + m.d.sync += self.serial.tx.o.eq(1) m.next = "IDLE" return m @@ -293,8 +293,8 @@ def elaborate(self, platform: Platform) -> Module: m = Module() serial = platform.request("uart") - leds = Cat([platform.request("led_r"), platform.request("led_g")]) - debug = platform.request("debug") + leds = Cat([platform.request("led_r").o, platform.request("led_g").o]) + debug = platform.request("debug").o self.uart = UART(serial, clk_freq=12000000, baud_rate=115200) m.submodules.uart = self.uart @@ -318,8 +318,8 @@ def elaborate(self, platform: Platform) -> Module: m.d.comb += [ leds.eq(self.uart.rx_data[0:2]), debug.eq(Cat( - serial.rx, - serial.tx, + serial.rx.i, + serial.tx.o, self.uart.rx_strobe, self.uart.tx_strobe, ))