xilskey
Vitis Drivers API Documentation
xilskey_bbram_ultrascale_example.c File Reference

Overview

xilskey_bbram_ultrascale_example.c

Note
Example illustrates the method of programming the AES key to Ultrascale BBRAM. The AES key to be programmed should be mentioned in xilskey_bbram_ultrascale_input.h. BBRAM is a battery backed RAM and there is no restriction on the number of times key can programmed. This algorithm only works when program and verify key are done together and in that order.

Accessing Ultrascale microblaze 's BBRAM is done by using block RAM initialization. Master Jtag primitive has to added to design i.e MASTER_JTAG_inst instantiation have to performed and AXI GPIO pins has to be connected to TDO, TDI, TMS and TCK signals of MASTER_JTAG primitive. All Inputs(TDO) and All Outputs(TDI, TMS, TCK) of MASTER_JTAG can be connected as 1) All Inputs to one channel All Outputs to other channel Valid example: All Outputs connected to Channel 1 Input signal TDO also connected to channel 2 2) All Inputs and All Outputs to same channel. Valid example: All Outputs connected to Channel 1 Input signal TDO also connected to channel 1 3) But some of the Outputs in one channel and some of them in different channel is not accepted. Invalid example: All Outputs connected to Channel 1 Input signals (TDI, TMS) connected to Channel 1 Input signal TCK also connected to channel 2

The design should only contain AXI bram Ctrl memory mapped(1MB). Note: MASTER_JTAG will disable all other JTAGs Procedure to access BBRAM of Ultrascale: 1) After providing the required inputs in xilskey_bbram_ultrascale_input.h, compile the project. 2) Generate a memory mapped interface file using TCL command write_mem_info $Outfilename 3) Update memory has to be done using the tcl command updatemem. updatemem -meminfo $file.mmi -data $Outfilename.elf -bit $design.bit -proc design_1_i/microblaze_0 -out $Final.bit 4) Program the board using $Final.bit bitstream 5) Output can be seen in UART terminal.

MODIFICATION HISTORY:

Ver Who Date Changes


5.0 vns 09/01/16 First Release. 6.0 vns 07/28/16 Updated example to allow counting configuration feature and to program Obfuscated key. 6.7 psl 03/20/19 Added BBRAM key write support for SSIT devices. psl 03/29/19 Added Support for user configurable GPIO for jtag control. 6.8 psl 05/21/19 Initialized SystemInitDone ,to indicate XilSKey_Bbram_JTAGServerInit status. And passed BbramInstancePtr instead of InstancePtr in XilSKey_Bbram_JTAGServerInit.

Functions

int XilSKey_Bbram_InitData (XilSKey_Bbram *BbramInstancePtr)
 Function to initialize BBRAM instance. More...
 
int XilSKey_Bbram_ProgramSLR (XilSKey_Bbram *BbramInstancePtr)
 Function to program the key for specific SLR. More...
 
void Bbram_Close_Ultra (void)
 This function close UltraScale. More...
 
int main ()
 

Function Documentation

void Bbram_Close_Ultra ( void  )

This function close UltraScale.

Returns
none
Note
none

References calcInstr(), jtag_navigate(), jtag_shift(), setPin(), and XilSKeyJtag.

Referenced by main().

int XilSKey_Bbram_InitData ( XilSKey_Bbram *  BbramInstancePtr)

Function to initialize BBRAM instance.

Parameters
BBRAMinstance pointer
Returns
  • XST_SUCCESS - In case of Success
  • XST_FAILURE - If initialization fails
Note
None.
int XilSKey_Bbram_ProgramSLR ( XilSKey_Bbram *  BbramInstancePtr)

Function to program the key for specific SLR.

Parameters
SLRnumber
Returns
  • XST_SUCCESS - In case of Success
  • XST_FAILURE - If initialization fails
Note
None.

References XilSKey_Bbram_Program().

Referenced by main().