From 418190703f723d74ec1a9373a58ebe60ccd12843 Mon Sep 17 00:00:00 2001 From: ambikeshwar Date: Tue, 23 Jun 2015 23:17:14 +0530 Subject: Documentation for GHDL added --- GHDLside.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 GHDLside.md (limited to 'GHDLside.md') diff --git a/GHDLside.md b/GHDLside.md new file mode 100644 index 0000000..64ad7f0 --- /dev/null +++ b/GHDLside.md @@ -0,0 +1,35 @@ +# Code Documentation (GHDL Side) + +This documentation will help you to know about the code written for communication between server and Digital logic written in VHDL + +## Files generated automatically for GHDL side + +* modelname_tb.vhdl +* Note: where modelname will be the name of your model + +## modelname_tb.vhdl + +* This is a testbench created to send and receive values from server and gives the input values to the digital design. +* It uses VHPI library of VHDL, by including this library we can use functions written in C program, in VHDL. +* In this test bench there are two processes used. +* First process is used to initialize, listen server and sending the output to server. +* Second process is used to giving inputs from server to digital design and taking the values to send through the server. + +### C functions used in modelname_tb.vhdl +#### Vhpi_Initialize +* This function is used to create the port and initialize the server. + +#### Vhpi_Listen +* This function is used to start communication between client and server. + +#### Vhpi_Send +* This function is used to send the values to client. + +#### Pack_String_To_Vhpi_String +* As we are sending values along with there variable name, we are using this function which convert the vhdl string to VHPI string. + +#### Vhpi_Get_Port_Value +* This function takes input values from server, when Vhpi_Listen called, and give it to digital design. + +#### Vhpi_Set_Port_Value +* This function is used to takes output values from digital design and send it through server when Vhpi_Send called. -- cgit