Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
cb2b3fd8
"...pyexps/git@developer.sourcefind.cn:cnjsdfcy/simbricks.git" did not exist on "ced8b8d141709741b03af7d6ffe44650c656efe7"
Unverified
Commit
cb2b3fd8
authored
Sep 16, 2024
by
Jakob Görgen
Browse files
system: minor fixes
parent
3d53a771
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
experiments/simbricks/orchestration/system/eth.py
experiments/simbricks/orchestration/system/eth.py
+4
-4
experiments/simbricks/orchestration/system/mem.py
experiments/simbricks/orchestration/system/mem.py
+2
-2
experiments/simbricks/orchestration/system/pcie.py
experiments/simbricks/orchestration/system/pcie.py
+3
-3
No files found.
experiments/simbricks/orchestration/system/eth.py
View file @
cb2b3fd8
...
...
@@ -43,16 +43,16 @@ class EthChannel(base.Channel):
class
EthSimpleNIC
(
base
.
Component
):
def
__init__
(
self
,
s
:
base
.
System
)
->
None
:
super
().
__init__
(
s
)
self
.
_ip
=
None
self
.
_eth_if
=
EthInterface
(
self
)
self
.
_ip
:
str
|
None
=
None
self
.
_eth_if
:
EthInterface
|
None
=
None
def
add_ipv4
(
self
,
ip
:
str
)
->
None
:
assert
self
.
_ip
is
None
self
.
ip
=
ip
self
.
_
ip
=
ip
def
add_if
(
self
,
interface
:
EthInterface
)
->
None
:
utils_base
.
has_expected_type
(
obj
=
interface
,
expected_type
=
EthInterface
)
assert
self
.
_eth_if
is
not
None
assert
self
.
_eth_if
is
None
self
.
_eth_if
=
interface
class
BaseEthNetComponent
(
base
.
Component
):
...
...
experiments/simbricks/orchestration/system/mem.py
View file @
cb2b3fd8
...
...
@@ -59,9 +59,9 @@ class MemSimpleDevice(base.Component):
self
.
_mem_if
:
MemDeviceInterface
|
None
=
None
def
interfaces
(
self
)
->
list
[
base
.
Interface
]:
return
[
self
.
mem_if
]
return
[
self
.
_
mem_if
]
def
add_if
(
interface
:
MemDeviceInterface
)
->
None
:
def
add_if
(
self
,
interface
:
MemDeviceInterface
)
->
None
:
utils_base
.
has_expected_type
(
obj
=
interface
,
expected_type
=
MemDeviceInterface
)
assert
self
.
_mem_if
is
None
self
.
_mem_if
=
interface
\ No newline at end of file
experiments/simbricks/orchestration/system/pcie.py
View file @
cb2b3fd8
...
...
@@ -56,12 +56,12 @@ class PCIeChannel(base.Channel):
class
PCIeSimpleDevice
(
base
.
Component
):
def
__init__
(
self
,
s
:
base
.
System
):
super
().
__init__
(
s
)
self
.
_pci_if
=
PCIeDeviceInterface
(
self
)
self
.
_pci_if
:
PCIeDeviceInterface
|
None
=
None
def
interfaces
(
self
)
->
list
[
base
.
Interface
]:
return
[
self
.
pci_if
]
return
[
self
.
_
pci_if
]
def
add_if
(
interface
:
PCIeDeviceInterface
)
->
None
:
def
add_if
(
self
,
interface
:
PCIeDeviceInterface
)
->
None
:
utils_base
.
has_expected_type
(
obj
=
interface
,
expected_type
=
PCIeDeviceInterface
)
assert
self
.
_pci_if
is
None
self
.
_pci_if
=
interface
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment