📄 pcireadme.txt
字号:
*** PCI TESTBENCH README ****** GENERAL OVERVIEW ***This GRPCI testbench contains modules, testcases and functions for acomplex PCI system. The top file (pci_top) represents the main PCIbus, where any number of instances can be attached, either LEONsystems or testbench modules.The actual PCI bus defined in the pci_top is a record (pci_type) of acomplete set of PCI signals. This record contains sub-records,arranged in a logic sense that simplifies readability in thecode. Example, <pci.syst> is a sub-record containing pci systemsignals, while <pci.err> contains error signals. When porting a designunit to the main bus one can either port the entire bus <pci>, asub-record <pci.syst>, as well as explicit signals <pci.syst.clk>.*** TEST MODULES ***A number of test modules are included, and can act either as passivecomponents on the PCI bus, or as active, stimuli generatingmodules. Below is a brief description of these modules. The completedeclaration of these modules can be found inlib/gaisler/ambacomp/ambatest.vhd and lib/gaisler/pci/pci.vhdpcitb_clkgen : PCI clock generator. Generates either a clock frequencyof 33MHz or 66MHzpcitb_arb : PCI arbiter. Arbits the PCI bus. It uses a non-hieracalqueue arbiting sequence to minimize the REQ-to-GNT time.pcitb_monitor : Monitors the traffic on the PCI bus, and generatessimulation interrupt if a failure is found.pcitb_master : A PCI master that is triggered through test procedures.pcitb_target : A PCI target that acts as a memory module on the PCIbus. Can be read through test procedures.pcitb_stimgen : The stimuli file where the main test process andprocedures are located.ahbmst_em : An AMBA AHB master that is triggered through testprocedures.ahbslv_em : An AMBA AHB slave that acts as a memory module on the AMBAbus. Can be read through test procedures.*** TEST PROCEDURES ***Each test module contains a test vector (tbi,tbo), that is controlledthrough existing procedures. These procedures are easily implementedin a sequencial test harness, and feed the test modules with accessparameters and waits until the access completes or fails. Theseprocedures can easily be modified if a special access is wanted.These functions are controlled by a record (ctrl), where the detailedaccess information is stored. This record contains the followingparameters: address (The address of the current access. This can be either AHB address or PCI address) data (The access data. For a write access, this parameter is feeded before calling the procedure. For a read access, this is the return data after the procedure is done.) status (This contains information of the result when calling a procedure. (OK, ERROR or TIMEOUT)) no_words (This is the number of words that is transferred in the access.) userfile (This is a true/false statement whether the access shall be controlled by existing file macro) usewfile (This is a true/false statement whether the read access result shall be stored in a file.) rfile (This is the input name of the file that contains the control macro,(see below)) wfile (This is the input name of the file where the output data is stored.)An example of an access: ctrl.address := conv_std_logic_vector(16#80000000#,32); ctrl.data := conv_std_logic_vector(16#12345678#,32); PCI_write_single(ctrl,tbi(0),tbo(0),dbglevel);*** USING FILES ***This testbench contains textio functions that can be used to simplifythe tests. Files can be used both as existing macros for complexaccesses, and as log files, where result data can be stored and, ifwanted, compared with existing data.A condition where a macro file can be useful is where a specificsequence of write data shall be transferred. When calling a testprocedure, only a single write data can be directly written to thetarget. If a large set of write data shall be transferred, theprocedure must be iterated for each write data. When using a macrofile, all data can be stored in the file, and the procedure must onlybe called once. This type of macro file can be used when accessing theAHB master and PCI master test modules. The master will then continuethe access until all write data in the file is transferred on the bus.All macro files must be built up in the same way so the master of theaccess can interpret it. Thus the macro files for the PCI master andthe AHB master will differ. Below is a description of each valid macrofile type. Each file is line based why the headlines in the examplesbelow also are required. Note that two types of macro files can beused with the AHB master module.AHB MACRO FILE TYPE 11 [1=long file, 0=Short file]--- TRANSFER 1 ---2 [Transfer type. 0=idle, 1=busy, 2=Non-sequential, 3=Sequential]1 [Burst type. 0=Single, 1=Incremental burst]2 [Transfer size. 0=Byte, 1=Half-word, 2=Word, 3=Double-word]0 [Protection control]F0000100 [Address (Hex format)]87654321 [Data (Hex format)]--- TRANSFER 2 ---1120F000010487654322--- TRANSFER 3 ---3120F000010487654322AHB MACRO FILE TYPE 2 (ctrl signals are default values)0 [1=long file, 0=Short file]--- TRANSFER 1 ---60000100 [Address (Hex format)]12345678 [Data (Hex format)]--- TRANSFER 2 ---6000010487654321--- TRANSFER 3 ---600001088765678APCI MACRO FILE TYPE 1--- ADDRESS & COMMAND ---00000000 [Address]7 [Command]--- DATA ---000000010000000200000003*** LOG FILES ***When doing read accesses with much data, a log file can be useful tocheck whether the received data matches the expected data. This logfunction is is implemented in both the PCI master and PCI target testmodules, as well as in the AHB master and AHB slave test modules, eventhough there is s small difference between the log functions. Whenusing a log file with a PCI/AHB master module, the log data representsthe data received in the actual access. When accessing the PCI targetor AHB slave modules, the log data only represents the memory contentsof the module.The log files can either be containing decimal or hexadecimal values,but normally hexadecimal values are used. A file comparing function isincluded in the package which takes the contents of two files andcompare them row by row.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -