# Xilinx SHA256 (include Vivado Suite block design flow)
Use SHA256 with vivado2016.4 and SDK
## HLS Part
\
Create a new HLS project

\
Add these four files and set sha256.c as top function
The files should in Research-master.zip @Secure Boot Google Drive

\
Add sha256_tb.c as testbench file

\
Select Zedboard

\
Run C simulation

\

\
Simulation result

\
Run C synthesis

\
Synthesis result

\
Run C/RTL cosimulation

\

\
Simulation result

\
Export RTL

\

\
The driver files are here

## PL Part
\
Add the RTL into our design and click "Run Connection Automation"

\
Design diagram

Create HDL wrapper > Generate Bitstream > Export Hardware > Launch SDK
## SDK Part
Create a new project and in its src folder add these files from
https://github.com/bigbrett/wssha256vivado/tree/master/sha256test.sdk/sha256-test/src

## Result
This SHA256 seems correct when the size of input data is not larger than 256bytes (2048bits)
\
Input data size is 256 byte

\
Input data size is 257 byte(wrong result)

## Reference Website
https://drive.google.com/drive/u/1/folders/0ALkSJ_VWnyngUk9PVA
https://github.com/bigbrett/wssha256vivado/tree/master/sha256test.sdk/sha256-test/src