Email: bknpk@hotmail.com Phone: +972-54-7649119


V

 

This page explains the makefile for cmpiling the systemc simple bus example.

  1. Recently I started to study the simple bus example from the systemc installation.

  2. After reading the detailed read me and slides I wanted to compile the example, but there was no makefile. So I created one.
    Next I found that there are some minor compilation errors.

  3. This page will describe the makefile as well as the minor changes, which were required.

  4. The header file, simple_bus_request.h, needed to be slightly modified (see highlighted lines):

    #ifndef __simple_bus_request_h
    #define __simple_bus_request_h

    //Pini
    #include "tlm.h"
    #include "simple_bus_types.h"
    ...
    // request status
    //Pini
    sc_core::sc_event transfer_done;
    ...

  5. The makefile can be seen, as plain text, from this link.
    Note c_list, which is mentioned in the makefile, is discussed in:
    e_search_P and gcc dependency files is discussed at
    dedependency.
    The compiler is given the -MD option, to create dependency files. A perl script extracts all file to a list. The list has to be sorted and unique (pipe sort | uniq commands).

    To run the porgram, just type: make run.exe. If debugger is needed, use make DBG_OPT="gdb " run.exe.

  6. For this project I found that using gdb to create the the loaded list file is better. From the gdb command line first direct output to a file: set logging on then issue the command to list all files: info sources and stop the gdb file log: set logging off
    Open the file with vi and run the following script from within vi by

    :%!perl ~/in/vim_gdb_info_src.pl vim script.
    :%!sort
    :%!uniq

    To summarize the script removes ',' as well as multiple spaces, at the end of line. If it finds two or more files in a line, it will split them into a single file in a line. To remove repetitions, sort and uniq linux commands are executed, from within VIM on the entire text.

  ...


Home

some memory VHDL models

A simple c-code program to read a memory array from verilog RTL, using VPI.






Search This Site


Feedback This Site




new pages on this site