Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
30
Issues
30
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit core collection
Commits
34850d90
Commit
34850d90
authored
Aug 17, 2011
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simulation models: old fabric emulator updated with an EthPacketSink interface
parent
2c03a7ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
fabric_emu.sv
sim/fabric_emu/fabric_emu.sv
+21
-0
fabric_emu_defs.sv
sim/fabric_emu/fabric_emu_defs.sv
+1
-1
No files found.
sim/fabric_emu/fabric_emu.sv
View file @
34850d90
...
...
@@ -417,6 +417,27 @@ module fabric_emu
tx_queue
.
push
(
frame
)
;
endtask
// send
task
automatic
send_raw
(
byte
raw_data
[])
;
reg
[
`c_wrsw_ctrl_size
-
1
:
0
]
ctrl_vec
[
0
:
2000
]
;
reg
[
15
:
0
]
data_vec
[
0
:
2000
]
;
int
error
,
i
;
for
(
i
=
0
;
i
<
(
raw_data
.
size
()
+
1
)
/
2
;
i
++
)
begin
ctrl_vec
[
i
]
=
`c_wrsw_ctrl_payload
;
data_vec
[
i
][
15
:
8
]
=
raw_data
[
2
*
i
]
;
data_vec
[
i
][
7
:
0
]
=
raw_data
[
2
*
i
+
1
]
;
end
send_fabric
(
data_vec
,
ctrl_vec
,
(
raw_data
.
size
()
%
2
)
?
1
:
0
,
i
,
i
-
1
,
error
)
;
endtask
// send_raw
// Handles WRF packet sink input
task
automatic
rx_process
()
;
...
...
sim/fabric_emu/fabric_emu_defs.sv
View file @
34850d90
...
...
@@ -26,7 +26,7 @@ typedef struct {
bit
[
31
:
0
]
fcs
;
bit
error
;
bit
has_payload
;
bit
has_raw
;
byte
raw_data
[]
;
}
ether_frame_t
;
...
...
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