Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SoCLabs SHA-2 Accelerator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SoCLabs
SoCLabs SHA-2 Accelerator
Commits
248221ef
Commit
248221ef
authored
2 years ago
by
dam1n19
Browse files
Options
Downloads
Patches
Plain Diff
fixed last bug and fixed message end pointer bug
parent
8c36b79e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hdl/src/message_build.sv
+2
-2
2 additions, 2 deletions
hdl/src/message_build.sv
model/py/message_build.py
+1
-0
1 addition, 0 deletions
model/py/message_build.py
with
3 additions
and
2 deletions
hdl/src/message_build.sv
+
2
−
2
View file @
248221ef
...
...
@@ -44,7 +44,7 @@ module message_build (
// Create Position Marker to show end of data message (place a "1")
// - only if not a multiple of 512
assign
end_marker
=
|
data_word_rem
?
1
<<
(
512
-
data_word_rem
-
1
)
:
512'd0
;
assign
end_marker
=
|
data_word_rem
?
1
<<
(
512
-
data_word_rem
)
:
512'd0
;
// Combine Last Data (after being masked) with end marker and size
assign
last_data_word
=
(
data_in
&
last_word_mask
)
|
end_marker
;
...
...
@@ -107,7 +107,6 @@ module message_build (
if
(
!
(
data_out_valid
&&
!
data_out_ready
))
begin
// If data out handshake has been seen, drop valid
next_data_out_valid
=
1'b0
;
next_data_out_last
=
1'b0
;
end
// If there is no Valid data at the output or there is a valid transfer happening on this clock cycle
if
(
cfg_valid
==
1'b1
)
begin
...
...
@@ -144,6 +143,7 @@ module message_build (
// Write Input Data to Output
next_data_out
=
data_in
;
next_data_out_valid
=
1'b1
;
next_data_out_last
=
1'b0
;
if
(
next_data_word_count
==
1
)
begin
// Last Input Data Word
next_state
=
3'd3
;
...
...
This diff is collapsed.
Click to expand it.
model/py/message_build.py
+
1
−
0
View file @
248221ef
...
...
@@ -47,6 +47,7 @@ def main(argv):
out_data_words
=
chunked_data_words
.
copy
()
out_data_words_last
=
[]
last_len
=
len
(
chunked_data_words
[
-
1
])
# print(chunked_data_words[-1])
if
(
last_len
==
512
):
out_data_words
.
append
(
"
1
"
+
"
0
"
*
447
+
cfg_size_str
)
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment