Changeset 374


Ignore:
Timestamp:
Apr 18, 2013, 1:28:33 PM (12 years ago)
Author:
joannou
Message:

Introducing vci_block_device_tsar component

Location:
trunk/modules/vci_block_device_tsar
Files:
4 deleted
5 copied

Legend:

Unmodified
Added
Removed
  • trunk/modules/vci_block_device_tsar/caba/metadata/vci_block_device_tsar.sd

    r371 r374  
    22# -*- python -*-
    33
    4 Module('caba:vci_block_device_tsar_v4',
    5            classname = 'soclib::caba::VciBlockDeviceTsarV4',
     4Module('caba:vci_block_device_tsar',
     5           classname = 'soclib::caba::VciBlockDeviceTsar',
    66           tmpl_parameters = [ parameter.Module('vci_param',  default = 'caba:vci_param'), ],
    7            header_files = ['../source/include/vci_block_device_tsar_v4.h', ],
    8            interface_files = ['../../include/soclib/block_device_tsar_v4.h', ],
    9            implementation_files = ['../source/src/vci_block_device_tsar_v4.cpp',],
     7           header_files = ['../source/include/vci_block_device_tsar.h', ],
     8           interface_files = ['../../include/soclib/block_device_tsar.h', ],
     9           implementation_files = ['../source/src/vci_block_device_tsar.cpp',],
    1010           ports = [
    1111                Port('caba:vci_target', 'p_vci_target'),
  • trunk/modules/vci_block_device_tsar/caba/source/include/vci_block_device_tsar.h

    r371 r374  
    7373///////////////////////////////////////////////////////////////////////////
    7474
    75 #ifndef SOCLIB_VCI_BLOCK_DEVICE_TSAR_V4_H
    76 #define SOCLIB_VCI_BLOCK_DEVICE_TSAR_V4_H
     75#ifndef SOCLIB_VCI_BLOCK_DEVICE_TSAR_H
     76#define SOCLIB_VCI_BLOCK_DEVICE_TSAR_H
    7777
    7878#include <stdint.h>
     
    8989
    9090template<typename vci_param>
    91 class VciBlockDeviceTsarV4
     91class VciBlockDeviceTsar
    9292        : public caba::BaseModule
    9393{
     
    200200protected:
    201201
    202     SC_HAS_PROCESS(VciBlockDeviceTsarV4);
     202    SC_HAS_PROCESS(VciBlockDeviceTsar);
    203203
    204204public:
     
    214214
    215215    // Constructor   
    216     VciBlockDeviceTsarV4(
     216    VciBlockDeviceTsar(
    217217                sc_module_name                      name,
    218218                const soclib::common::MappingTable      &mt,
     
    227227}}
    228228
    229 #endif /* SOCLIB_VCI_BLOCK_DEVICE_TSAR_V4_H */
     229#endif /* SOCLIB_VCI_BLOCK_DEVICE_TSAR_H */
    230230
    231231// Local Variables:
  • trunk/modules/vci_block_device_tsar/caba/source/src/vci_block_device_tsar.cpp

    r371 r374  
    3030#include <iostream>
    3131#include <fcntl.h>
    32 #include "vci_block_device_tsar_v4.h"
     32#include "vci_block_device_tsar.h"
    3333
    3434namespace soclib { namespace caba {
    3535
    36 #define tmpl(t) template<typename vci_param> t VciBlockDeviceTsarV4<vci_param>
     36#define tmpl(t) template<typename vci_param> t VciBlockDeviceTsar<vci_param>
    3737
    3838using namespace soclib::caba;
     
    535535
    536536//////////////////////////////////////////////////////////////////////////////
    537 tmpl(/**/)::VciBlockDeviceTsarV4( sc_core::sc_module_name              name,
     537tmpl(/**/)::VciBlockDeviceTsar( sc_core::sc_module_name              name,
    538538                                  const soclib::common::MappingTable   &mt,
    539539                                  const soclib::common::IntTab         &srcid,
     
    571571        (block_size != 4096) )
    572572        {
    573                 std::cout << "Error in component VciBlockDeviceTsarV4 : " << name << std::endl;
     573                std::cout << "Error in component VciBlockDeviceTsar : " << name << std::endl;
    574574                std::cout << "The block size must be 128, 256, 512, 1024, 2048 or 4096 bytes" << std::endl;
    575575                exit(1);
     
    583583                (burst_size != 64) )
    584584        {
    585                 std::cout << "Error in component VciBlockDeviceTsarV4 : " << name << std::endl;
     585                std::cout << "Error in component VciBlockDeviceTsar : " << name << std::endl;
    586586                std::cout << "The burst size must be 1, 2, 4, 8, 16, 32 or 64 bytes" << std::endl;
    587587                exit(1);
     
    589589        if ( m_segment.size() < 32 )
    590590        {
    591                 std::cout << "Error in component VciBlockDeviceTsarV4 : " << name << std::endl;
     591                std::cout << "Error in component VciBlockDeviceTsar : " << name << std::endl;
    592592                std::cout << "The size of the segment cannot be smaller than 32 bytes" << std::endl;
    593593                exit(1);
     
    595595        if ( (m_segment.baseAddress() & 0x0000001F) != 0 )
    596596        {
    597                 std::cout << "Error in component VciBlockDeviceTsarV4 : " << name << std::endl;
     597                std::cout << "Error in component VciBlockDeviceTsar : " << name << std::endl;
    598598                std::cout << "The base address of the segment must be multiple of 32 bytes" << std::endl;
    599599                exit(1);
     
    601601        if ( vci_param::B != 4 )
    602602        {
    603                 std::cout << "Error in component VciBlockDeviceTsarV4 : " << name << std::endl;
     603                std::cout << "Error in component VciBlockDeviceTsar : " << name << std::endl;
    604604                std::cout << "The VCI data fields must have 32 bits" << std::endl;
    605605                exit(1);
     
    608608        if ( m_fd < 0 )
    609609        {
    610                 std::cout << "Error in component VciBlockDeviceTsarV4 : " << name << std::endl;
     610                std::cout << "Error in component VciBlockDeviceTsar : " << name << std::endl;
    611611                std::cout << "Unable to open file " << filename << std::endl;
    612612                exit(1);
  • trunk/modules/vci_block_device_tsar/include/soclib/block_device_tsar.h

    r371 r374  
    2525 * Maintainers: alain
    2626 */
    27 #ifndef BLOCK_DEVICE_TSAR_V4_REGS_H
    28 #define BLOCK_DEVICE_TSAR_V4_REGS_H
     27#ifndef BLOCK_DEVICE_TSAR_REGS_H
     28#define BLOCK_DEVICE_TSAR_REGS_H
    2929
    3030enum SoclibBlockDeviceRegisters {
     
    5454};
    5555
    56 #endif /* BLOCK_DEVICE_TSAR_V4_REGS_H */
     56#endif /* BLOCK_DEVICE_TSAR_REGS_H */
    5757
    5858// Local Variables:
Note: See TracChangeset for help on using the changeset viewer.