Skip to content

Commit 9a38149

Browse files
committed
The great renamming: ASIC_ON_BOARD replaced by more clearer ASIC_RP_CONTROL
1 parent abebeb1 commit 9a38149

File tree

10 files changed

+28
-29
lines changed

10 files changed

+28
-29
lines changed

src/config.ini

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ start_in_reset = no
2020

2121
# mode can be any of
2222
# - SAFE: all RP2040 pins inputs
23-
# - ASIC_ON_BOARD: TT inputs,nrst and clock driven, outputs monitored
23+
# - ASIC_RP_CONTROL: TT inputs,nrst and clock driven, outputs monitored
2424
# - ASIC_MANUAL_INPUTS: basically same as safe, but intent is clear
25-
# - STANDALONE: *no* TT ASIC on-board, testing mode, outputs driven, inputs monitored
26-
mode = ASIC_ON_BOARD
25+
mode = ASIC_RP_CONTROL
2726

2827
# log_level can be one of
2928
# - DEBUG
@@ -50,7 +49,7 @@ input_byte = 1
5049
clock_frequency = 4000
5150
# clock config 4k, disp single bits
5251
input_byte = 0b11001000
53-
mode = ASIC_ON_BOARD
52+
mode = ASIC_RP_CONTROL
5453

5554

5655

@@ -70,7 +69,7 @@ bidir_byte = 0b110010101
7069
[tt_um_vga_clock]
7170
rp_clock_frequency = 126e6
7271
clock_frequency = 31.5e6
73-
mode = ASIC_ON_BOARD
72+
mode = ASIC_RP_CONTROL
7473

7574

7675
[tt_um_urish_simon]
@@ -79,7 +78,7 @@ mode = ASIC_MANUAL_INPUTS
7978

8079

8180
[tt_um_algofoogle_solo_squash]
82-
mode = ASIC_ON_BOARD
81+
mode = ASIC_RP_CONTROL
8382

8483
# start inactive (all ins 0)
8584
input_byte = 0

src/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
def startup():
4040

4141
# construct DemoBoard
42-
# either pass an appropriate RPMode, e.g. RPMode.ASIC_ON_BOARD
43-
# or have "mode = ASIC_ON_BOARD" in ini DEFAULT section
42+
# either pass an appropriate RPMode, e.g. RPMode.ASIC_RP_CONTROL
43+
# or have "mode = ASIC_RP_CONTROL" in ini DEFAULT section
4444
ttdemoboard = DemoBoard()
4545

4646

src/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import time
1111
from ttboard.demoboard import DemoBoard, RPMode
1212

13-
tt = DemoBoard(RPMode.ASIC_ON_BOARD)
13+
tt = DemoBoard(RPMode.ASIC_RP_CONTROL)
1414

1515
def test_design_tnt_counter():
1616
tt.shuttle.tt_um_test.enable()

src/ttboard/boot/firstboot_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def say_hello(delay_interval_ms:int=100, times:int=1):
104104
hello_values = [0x74, 0x79, 0x30, 0x30, 0x5c, 0, 0x50, 0x10, 0x78, 0x77]
105105
tt = get_demoboard()
106106
tt.shuttle.tt_um_test.enable()
107-
tt.mode = RPMode.ASIC_ON_BOARD # make sure we're controlling everything
107+
tt.mode = RPMode.ASIC_RP_CONTROL # make sure we're controlling everything
108108

109109
tt.in0(0) # want this low
110110
tt.clock_project_PWM(1e3) # clock it real good

src/ttboard/boot/post.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ def test_bidirs(self) -> bool:
104104
# select the project from the shuttle
105105
update_delay_ms = 2
106106
auto_clock_freq = 1e3
107-
self.tt.mode = RPMode.ASIC_ON_BOARD # make sure we're controlling everything
107+
self.tt.mode = RPMode.ASIC_RP_CONTROL # make sure we're controlling everything
108108

109109
self.tt.shuttle.tt_um_test.enable()
110110
curMode = self.tt.mode
111-
self.tt.mode = RPMode.ASIC_ON_BOARD # make sure we're controlling everything
111+
self.tt.mode = RPMode.ASIC_RP_CONTROL # make sure we're controlling everything
112112
self.tt.reset_project(False)
113113
self.tt.in0(0) # want this low
114114
self.tt.clock_project_PWM(auto_clock_freq) # clock it real good

src/ttboard/config/user_config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class UserProjectConfig:
2121
clock_frequency = 4000
2222
# clock config 4k, disp single bits
2323
input_byte = 0b11001000
24-
mode = ASIC_ON_BOARD
24+
mode = ASIC_RP_CONTROL
2525
2626
You can use this to set:
2727
- mode (str)
@@ -98,9 +98,9 @@ class UserConfig(ConfigFile):
9898
9999
# mode can be any of
100100
# - SAFE: all RP2040 pins inputs
101-
# - ASIC_ON_BOARD: TT inputs,nrst and clock driven, outputs monitored
101+
# - ASIC_RP_CONTROL: TT inputs,nrst and clock driven, outputs monitored
102102
# - ASIC_MANUAL_INPUTS: basically same as safe, but intent is clear
103-
mode = ASIC_ON_BOARD
103+
mode = ASIC_RP_CONTROL
104104
105105
# log_level can be one of
106106
# - DEBUG

src/ttboard/demoboard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __init__(self,
7474
7575
* RPMode.SAFE, the default, which has every pin as an INPUT, no pulls
7676
77-
* RPMode.ASIC_ON_BOARD, for use with ASICs, where it watches the OUTn
77+
* RPMode.ASIC_RP_CONTROL, for use with ASICs, where it watches the OUTn
7878
(configured as inputs) and can drive the INn and tickle the
7979
ASIC inputs (configured as outputs)
8080
@@ -248,7 +248,7 @@ def apply_user_config(self, design:Design):
248248
log.debug(f'Design "{design.name}" loaded, apply user conf')
249249

250250
applyWhenInModeMap = {
251-
RPMode.ASIC_ON_BOARD: True,
251+
RPMode.ASIC_RP_CONTROL: True,
252252
RPMode.ASIC_MANUAL_INPUTS: True
253253
}
254254
if not self.apply_configs:

src/ttboard/mode.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
'''
77
class ModeBase:
88
SAFE = 0
9-
ASIC_ON_BOARD = 1
9+
ASIC_RP_CONTROL = 1
1010
ASIC_MANUAL_INPUTS = 2
1111

1212
@classmethod
1313
def modemap(cls):
1414
modeMap = {
1515
'SAFE': cls.SAFE,
16-
'ASIC_ON_BOARD': cls.ASIC_ON_BOARD,
16+
'ASIC_RP_CONTROL': cls.ASIC_RP_CONTROL,
1717
'ASIC_MANUAL_INPUTS': cls.ASIC_MANUAL_INPUTS
1818
}
1919
return modeMap
@@ -34,7 +34,7 @@ def from_string(cls, s:str):
3434
def namemap(cls):
3535
nameMap = {
3636
cls.SAFE: 'SAFE',
37-
cls.ASIC_ON_BOARD: 'ASIC_ON_BOARD',
37+
cls.ASIC_RP_CONTROL: 'ASIC_RP_CONTROL',
3838
cls.ASIC_MANUAL_INPUTS: 'ASIC_MANUAL_INPUTS',
3939
}
4040
return nameMap
@@ -52,7 +52,7 @@ class RPMode(ModeBase):
5252
RPMode.MODE notation and code completion
5353
where MODE is one of:
5454
SAFE
55-
ASIC_ON_BOARD
55+
ASIC_RP_CONTROL
5656
ASIC_MANUAL_INPUTS
5757
'''
5858
pass
@@ -70,7 +70,7 @@ class RPModeDEVELOPMENT(ModeBase):
7070
def modemap(cls):
7171
modeMap = {
7272
'SAFE': cls.SAFE,
73-
'ASIC_ON_BOARD': cls.ASIC_ON_BOARD,
73+
'ASIC_RP_CONTROL': cls.ASIC_RP_CONTROL,
7474
'ASIC_MANUAL_INPUTS': cls.ASIC_MANUAL_INPUTS,
7575
'STANDALONE': cls.STANDALONE
7676
}
@@ -80,7 +80,7 @@ def modemap(cls):
8080
def namemap(cls):
8181
nameMap = {
8282
cls.SAFE: 'SAFE',
83-
cls.ASIC_ON_BOARD: 'ASIC_ON_BOARD',
83+
cls.ASIC_RP_CONTROL: 'ASIC_RP_CONTROL',
8484
cls.ASIC_MANUAL_INPUTS: 'ASIC_MANUAL_INPUTS',
8585
cls.STANDALONE: 'STANDALONE'
8686
}

src/ttboard/pins/pins.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
1414
TLDR
1515
1) get pins
16-
p = Pins(RPMode.ASIC_ON_BOARD) # monitor/control ASIC
16+
p = Pins(RPMode.ASIC_RP_CONTROL) # monitor/control ASIC
1717
1818
2) play with pins
1919
print(p.out2()) # read
@@ -106,7 +106,7 @@ class Pins:
106106
107107
So this class has 3 modes of pin init at startup:
108108
* RPMode.SAFE, the default, which has every pin as an INPUT, no pulls
109-
* RPMode.ASIC_ON_BOARD, for use with ASICs, where it watches the OUTn
109+
* RPMode.ASIC_RP_CONTROL, for use with ASICs, where it watches the OUTn
110110
(configured as inputs) and can drive the INn and tickle the
111111
ASIC inputs (configured as outputs)
112112
* RPMode.STANDALONE: where OUTn is an OUTPUT, INn is an input, useful
@@ -157,7 +157,7 @@ def mode(self):
157157
def mode(self, setTo:int):
158158
startupMap = {
159159
RPModeDEVELOPMENT.STANDALONE: self.begin_standalone,
160-
RPMode.ASIC_ON_BOARD: self.begin_asiconboard,
160+
RPMode.ASIC_RP_CONTROL: self.begin_asiconboard,
161161
RPMode.ASIC_MANUAL_INPUTS: self.begin_asic_manual_inputs,
162162
RPMode.SAFE: self.begin_safe
163163
}
@@ -292,7 +292,7 @@ def begin_safe(self):
292292

293293

294294
def begin_asiconboard(self):
295-
log.debug('begin: ASIC_ON_BOARD')
295+
log.debug('begin: ASIC_RP_CONTROL')
296296
self.begin_inputs_all()
297297
self._begin_alwaysOut()
298298
unconfigured_pins = []

src/ttboard/util/shuttle_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def factory_test_bidirs(tt:DemoBoard, max_idx:int=255, delay_interval_ms:int=1):
2727
auto_clock_freq = 1e3
2828
tt.shuttle.tt_um_test.enable()
2929
curMode = tt.mode
30-
tt.mode = RPMode.ASIC_ON_BOARD # make sure we're controlling everything
30+
tt.mode = RPMode.ASIC_RP_CONTROL # make sure we're controlling everything
3131

3232
tt.in0(0) # want this low
3333
tt.clock_project_PWM(auto_clock_freq) # clock it real good
@@ -75,7 +75,7 @@ def factory_test_clocking(tt:DemoBoard, max_idx:int=30, delay_interval_ms:int=50
7575

7676
# select the project from the shuttle
7777
tt.shuttle.tt_um_test.enable()
78-
tt.mode = RPMode.ASIC_ON_BOARD # make sure we're controlling everything
78+
tt.mode = RPMode.ASIC_RP_CONTROL # make sure we're controlling everything
7979

8080

8181
tt.reset_project(True)

0 commit comments

Comments
 (0)