source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_body.cpp @ 44

Last change on this file since 44 was 41, checked in by rosiere, 17 years ago

Vhdl_Testbench : Modification du testbench. Maintenant complétement encapsuler dans la classe "Interfaces".
Suppression de la class Vhdl_Testbench dans un avenir proche :D
Suppression du répertoire Configuration.old

File size: 2.2 KB
RevLine 
[2]1#ifdef VHDL
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
[15]9#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
[2]10
11namespace morpheo                    {
12namespace behavioural                {
13namespace generic                    {
14namespace registerfile               {
[15]15namespace registerfile_monolithic    {
[2]16
[41]17  void RegisterFile_Monolithic::vhdl_body (Vhdl * & vhdl)
[2]18  {
[41]19    vhdl->set_body ("");
20    vhdl->set_body ("-----------------------------------------------------------------------------");
21    vhdl->set_body ("-- Read RegisterFile");
22    vhdl->set_body ("-----------------------------------------------------------------------------");
23    vhdl->set_body ("");
[2]24   
25    for (uint32_t i = 0; i < _param._nb_port_read; i++)
[6]26      {
[41]27        vhdl->set_body ("out_READ_"+toString(i)+"_ACK  <= '1';");
28        vhdl->set_body ("out_READ_"+toString(i)+"_DATA <= reg_DATA (conv_integer(in_READ_"+toString(i)+"_ADDRESS)) when in_READ_"+toString(i)+"_VAL = '1' else "+std_logic_others(_param._size_word,0)+";");
[6]29      }
[2]30
[41]31    vhdl->set_body ("");
32    vhdl->set_body ("-----------------------------------------------------------------------------");
33    vhdl->set_body ("-- Write RegisterFile");
34    vhdl->set_body ("-----------------------------------------------------------------------------");
35    vhdl->set_body ("");
36
37    vhdl->set_body ("RegisterFile_write: process (in_CLOCK)");
38    vhdl->set_body ("begin  -- process RegisterFile_write");
39    vhdl->set_body ("\tif in_CLOCK'event and in_CLOCK = '1' then");
[2]40   
41    for (uint32_t i = 0; i < _param._nb_port_write; i++)
42      {
[41]43      vhdl->set_body ("\t\tif (in_WRITE_"+toString(i)+"_VAL = '1') then");
44      vhdl->set_body ("\t\t\treg_DATA(conv_integer(in_WRITE_"+toString(i)+"_ADDRESS)) <= in_WRITE_"+toString(i)+"_DATA;");
45      vhdl->set_body ("\t\tend if;");
[2]46      }
47
[41]48    vhdl->set_body ("\tend if;");
49    vhdl->set_body ("end process RegisterFile_write;");
[6]50
51    for (uint32_t i = 0; i < _param._nb_port_write; i++)
[41]52      vhdl->set_body ("out_WRITE_"+toString(i)+"_ACK <= '1';");
[2]53  };
54
[15]55}; // end namespace registerfile_monolithic
[2]56}; // end namespace registerfile
57}; // end namespace generic
58}; // end namespace behavioural         
59}; // end namespace morpheo             
60#endif
Note: See TracBrowser for help on using the repository browser.