Skip to content

Commit 69e2b84

Browse files
dheepk-mchpShuranXuMCHPManuelSaldanajennifermah76
authored
update for 2025.1 release (#99)
* Update from 2024.2 to 2025.1: -update readmes for 2025.1 release -update tcl with corrected path and new IPs -add ps1 scripts for existing sh scripts -add error message in cpp/hpp files for missing files when opening them -update assets with the latest job and elf files -delete the sincos table (excel sheet) and add the formula to the relevant hpp file for Training4 * incorporate comments from PR * Re-add output_image allocation to fix Buildbot. * Update README.md remove not on "known issue on python3" from previous release * Update README.md add note of known issues in auto instrumentation --------- Co-authored-by: Shuran Xu <[email protected]> Co-authored-by: ManuelSaldana <[email protected]> Co-authored-by: Jennifer Mah <[email protected]> Co-authored-by: jennifermah76 <[email protected]>
1 parent 36da282 commit 69e2b84

File tree

49 files changed

+613
-365
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+613
-365
lines changed

.gitattributes

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# don't modify line endings of bash scripts
22
*.sh text eol=lf
3-
*.job filter=lfs diff=lfs merge=lfs -text
4-
*.zip filter=lfs diff=lfs merge=lfs -text
5-
*.wic.gz filter=lfs diff=lfs merge=lfs -text
3+
#*.job filter=lfs diff=lfs merge=lfs -text
4+
#*.zip filter=lfs diff=lfs merge=lfs -text
5+
#*.wic.gz filter=lfs diff=lfs merge=lfs -text

Canny_RISCV/bmp.hpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,21 @@ struct bmp_header_t {
5959

6060
bmp_pixel_t *read_bmp(const char *filename, bmp_header_t *header) {
6161
FILE *file = fopen(filename, "rb");
62-
if (!file) return NULL;
62+
if (!file) {
63+
fprintf(stderr, "Error: Could not open input image file '%s'\n", filename);
64+
return nullptr;
65+
}
6366

6467
// read BMP header and verify width/height
65-
if (fread(header, sizeof(bmp_header_t), 1, file) != 1) return NULL;
68+
if (fread(header, sizeof(bmp_header_t), 1, file) != 1) return nullptr;
6669
if (header->offset != sizeof(bmp_header_t) ||
67-
header->width != WIDTH || header->height != HEIGHT) return NULL;
70+
header->width != WIDTH || header->height != HEIGHT) return nullptr;
6871

6972
// allocate image buffer
7073
bmp_pixel_t *image = (bmp_pixel_t*)malloc(SIZE * sizeof(bmp_pixel_t));
7174

7275
// read BMP image
73-
if (fread(image, sizeof(bmp_pixel_t), SIZE, file) != SIZE) return NULL;
76+
if (fread(image, sizeof(bmp_pixel_t), SIZE, file) != SIZE) return nullptr;
7477

7578
fclose(file);
7679
return image;

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,25 @@ The homepage for the Microchip HLS integrated development environment is:
55
- https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/smarthls-compiler
66

77
You can find the Microchip HLS software user guide here:
8-
- https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=fpgahls&redirect=true&version=latest
8+
- https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=fpgahls&redirect=true&version=latest
9+
10+
# Note:
11+
To download the precompiled binaries, go to "Releases" then "Assets" or run the following code
12+
13+
Linux:
14+
<pre> bash setup.sh </pre>
15+
16+
Windows:
17+
<pre> ./setup.ps1 </pre>
18+
19+
(**if needed**)
20+
21+
By default, Windows restricts script execution. To allow scripts, right-click the PowerShell icon and select "Run as administrator" then run
22+
<pre> Set-ExecutionPolicy Unrestricted </pre>
23+
or set execution policy for current user only
24+
<pre> Set-ExecutionPolicy Unrestricted -Scope CurrentUser </pre>
25+
26+
927

1028
## Tutorials and Trainings
1129
Example | Description

Training1/Canny/canny.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,23 @@ int main() {
3939

4040
// read inputs from file
4141
input_channel = read_bmp(INPUT_IMAGE, &input_channel_header);
42-
if (!input_channel) return 1;
42+
if (!input_channel){
43+
printf( "Error: Unable to open the file %s \n",INPUT_IMAGE);
44+
return 1;
45+
}
46+
4347
input_channel_sw = input_channel;
4448

4549
golden_output_image = read_bmp(GOLDEN_OUTPUT, &golden_output_image_header);
46-
if (!golden_output_image) return 1;
4750

4851
output_image = (bmp_pixel_t*)malloc(SIZE * sizeof(bmp_pixel_t));
4952
output_image_ptr = output_image;
5053

54+
if (!golden_output_image){
55+
printf( "Error: Unable to open the file %s \n",GOLDEN_OUTPUT);
56+
return 1;
57+
}
58+
5159
// convert image to grayscale and write to input array
5260
unsigned char (*input_image)[WIDTH] = new unsigned char[HEIGHT][WIDTH];
5361
for (i = 0; i < HEIGHT; i++) {

Training1/Canny_FIFO_Switch/canny.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,18 @@ int main() {
4747

4848
// read inputs from file
4949
input_channel = read_bmp(INPUT_IMAGE, &input_channel_header);
50-
if (!input_channel) return 1;
50+
if (!input_channel){
51+
printf( "Error: Unable to open the file %s \n",INPUT_IMAGE);
52+
return 1;
53+
}
54+
5155
input_channel_sw = input_channel;
5256

5357
golden_output_image = read_bmp(GOLDEN_OUTPUT, &golden_output_image_header);
54-
if (!golden_output_image) return 1;
58+
if (!golden_output_image){
59+
printf( "Error: Unable to open the file %s \n",GOLDEN_OUTPUT);
60+
return 1;
61+
}
5562

5663
output_image = (bmp_pixel_t*)malloc(SIZE * sizeof(bmp_pixel_t));
5764
output_image_ptr = output_image;

Training1/Gaussian_FIFO_Pipelined/gaussian_filter.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,16 @@ int main() {
109109

110110
// read inputs from file
111111
input_channel = read_bmp(INPUT_IMAGE, &input_channel_header);
112-
if (!input_channel) return 1;
112+
if (!input_channel){
113+
printf( "Error: Unable to open the file %s \n",INPUT_IMAGE);
114+
return 1;
115+
}
113116

114117
golden_output_image = read_bmp(GOLDEN_OUTPUT, &golden_output_image_header);
115-
if (!golden_output_image) return 1;
118+
if (!golden_output_image) {
119+
printf( "Error: Unable to open the file %s \n",GOLDEN_OUTPUT);
120+
return 1;
121+
}
116122

117123
output_image = (bmp_pixel_t*)malloc(SIZE * sizeof(bmp_pixel_t));
118124
output_image_ptr = output_image;

Training1/Gaussian_Memory_Interface/gaussian_filter.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,18 @@ int main() {
6868

6969
// read inputs from file
7070
input_channel = read_bmp(INPUT_IMAGE, &input_channel_header);
71-
if (!input_channel) return 1;
71+
if (!input_channel){
72+
printf( "Error: Unable to open the file %s \n",INPUT_IMAGE);
73+
return 1;
74+
}
75+
7276
input_channel_sw = input_channel;
7377

7478
golden_output_image = read_bmp(GOLDEN_OUTPUT, &golden_output_image_header);
75-
if (!golden_output_image) return 1;
79+
if (!golden_output_image){
80+
printf( "Error: Unable to open the file %s \n",INPUT_IMAGE);
81+
return 1;
82+
}
7683

7784
output_image = (bmp_pixel_t*)malloc(SIZE * sizeof(bmp_pixel_t));
7885
output_image_ptr = output_image;

Training1/Gaussian_Memory_Interface_Pipelined/gaussian_filter.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,17 @@ int main() {
6969

7070
// read inputs from file
7171
input_channel = read_bmp(INPUT_IMAGE, &input_channel_header);
72-
if (!input_channel) return 1;
72+
if (!input_channel){
73+
printf( "Error: Unable to open the file %s \n",INPUT_IMAGE);
74+
return 1;
75+
}
7376
input_channel_sw = input_channel;
7477

7578
golden_output_image = read_bmp(GOLDEN_OUTPUT, &golden_output_image_header);
76-
if (!golden_output_image) return 1;
79+
if (!golden_output_image){
80+
printf( "Error: Unable to open the file %s \n",INPUT_IMAGE);
81+
return 1;
82+
}
7783

7884
output_image = (bmp_pixel_t*)malloc(SIZE * sizeof(bmp_pixel_t));
7985
output_image_ptr = output_image;

Training1/Libero/libero_flow.tcl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ set Display_Controller_version 3.1.2
2525
set HDMI_RX_version 4.2.0
2626
set HDMI_TX_version 1.0.2
2727
set PF_TX_PLL_version 2.0.304
28-
set PF_XCVR_ERM_version 3.1.205
28+
set PF_XCVR_ERM_version 3.1.206
2929
set PF_XCVR_REF_CLK_version 1.0.103
3030
set CORERESET_PF_version 2.2.107
3131
set CORERXIODBITALIGN_version 2.1.104
32-
set PF_IOD_GENERIC_RX_version 2.1.110
33-
set PF_DDR4_version 2.5.111
32+
set PF_IOD_GENERIC_RX_version 2.1.113
33+
set PF_DDR4_version 2.5.120
3434
set PF_SRAM_AHBL_AXI_version 1.2.111
3535
set mipicsi2rxdecoderPF_version 2.2.5
3636
set COREAHBTOAPB3_version 3.1.100
@@ -39,7 +39,7 @@ set CoreAPB3_version 4.1.100
3939
set CoreGPIO_version 3.2.102
4040
set COREJTAGDEBUG_version 3.1.100
4141
set CoreAHBLite_version 5.4.102
42-
set PF_INIT_MONITOR_version 2.0.307
42+
set PF_INIT_MONITOR_version 2.0.308
4343
set MIV_RV32IMA_L1_AHB_version 2.3.100
4444
set COREUART_version 5.6.102
4545
set Bayer_Interpolation_version 3.0.2

Training1/Libero/run_shls_on_examples.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@
55

66
Write-Host "Running shls hw on Canny_FIFO_Switch"
77
cd ../Canny_FIFO_Switch
8-
shls hw
8+
shls -a hw
99

1010
Write-Host "Running shls hw on Gaussian_FIFO_Pipelined"
1111
cd ../Gaussian_FIFO_Pipelined
12-
shls hw
12+
shls -a hw
1313

1414
Write-Host "Running shls hw on RGB2YCbCr"
1515
cd ../RGB2YCbCr
16-
shls hw
16+
shls -a hw
1717

1818
Write-Host "Running shls hw on YCbCr2RGB"
1919
cd ../YCbCr2RGB
20-
shls hw
20+
shls -a hw
2121

2222
Write-Host "Running shls hw on alpha_blend"
2323
cd ../alpha_blend
24-
shls hw
24+
shls -a hw
2525

2626
cd ../Libero/
2727

0 commit comments

Comments
 (0)