Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Embedded Acceleration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Vipin Thomas
Embedded Acceleration
Commits
f8a18eb8
Commit
f8a18eb8
authored
3 years ago
by
Majd Hafiri
Browse files
Options
Downloads
Patches
Plain Diff
Update pixel.cpp
parent
5e8b8bb3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pixel.cpp
+11
-17
11 additions, 17 deletions
pixel.cpp
with
11 additions
and
17 deletions
pixel.cpp
+
11
−
17
View file @
f8a18eb8
...
...
@@ -9,14 +9,15 @@ typedef ap_int<32> apint;
typedef
ap_axis
<
32
,
0
,
0
,
0
>
pkt_t
;
typedef
hls
::
stream
<
pkt_t
>
stream
;
static
int
count_streams
=
0
;
static
long
long
charIn
=
0
;
static
long
long
final_char
=
0
;
int
addNum
=
0
;
static
int
decNum
=
0
;
static
int
decimalCounter
=
0
;
static
int
decimalOut
=
0
;
int
lastDecimalVal
;
//Initializations
static
int
count_streams
=
0
;
//counter of data input streams
static
long
long
charIn
=
0
;
// to store binary values for each charachter decimal val
static
long
long
final_char
=
0
;
// binary value of decoded data
int
addNum
=
0
;
// holds lsb of CharIn
static
int
decNum
=
0
;
//holds the decimal value for all characters
static
int
decimalCounter
=
0
;
//used to shift to other charachter decimal value
static
int
decimalOut
=
0
;
// holds the decimal value of the characters (decoding)
int
lastDecimalVal
;
//holds decimal value of one character
long
long
convert
(
int
n
);
int
convertBinInt
(
long
long
n
);
...
...
@@ -39,7 +40,7 @@ void pixel(apint &in_decimal,
#pragma HLS INTERFACE axis port=dout
din
>>
tmpA
;
// toAscii(key);
switch
(
selector
)
{
case
0
:
...
...
@@ -48,8 +49,7 @@ void pixel(apint &in_decimal,
final_char
=
0
;
decNum
=
in_decimal
;
}
//123456321
// addNum=0;
addNum
=
0
;
if
(
decimalCounter
%
8
==
0
){
lastDecimalVal
=
getDecimal
(
decNum
);
...
...
@@ -60,12 +60,6 @@ void pixel(apint &in_decimal,
addNum
=
charIn
%
10
;
charIn
=
(
int
)
charIn
/
10
;
// if(decNum !=0 ){
// pkt.data += getDecimal(decNum);
// decNum = decNum/1000;
// }
if
(
tmpA
.
data
%
2
==
0
&&
addNum
==
1
){
tmpA
.
data
+=
1
;
...
...
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