source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_body.cpp @ 59

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

Add Load store queue -> but not terminated and tested
Add article to sympa 2007 -> but no started

File size: 1.6 KB
Line 
1#ifdef VHDL
2/*
3 * $Id$
4 *
5 * [ Description ]
6 *
7 */
8
9#include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h"
10
11namespace morpheo                    {
12namespace behavioural {
13namespace generic {
14namespace select {
15namespace select_priority_fixed {
16
17
18  void Select_Priority_Fixed::vhdl_body (Vhdl * & vhdl)
19  {
20    log_printf(FUNC,Select_Priority_Fixed,"vhdl_body","Begin");
21    vhdl->set_body ("");
22
23    vhdl->set_body("internal_entity <=");
24    for (uint32_t i=0; i<_param->_nb_entity; i++)
25      {
26        vhdl->set_body("\t"+std_logic_conv(_param->_size_entity+1,i)+" when in_VAL_"+toString(i)+"='1' else");
27      }
28    vhdl->set_body("\t"+std_logic_conv(_param->_size_entity+1,1<<_param->_size_entity)+";");
29    vhdl->set_body ("");
30
31    if (_param->_encoding_one_hot)
32      {
33        for (uint32_t i=0; i<_param->_nb_entity; i++)
34          vhdl->set_body("out_ACK_"+toString(i)+" <= '1' when internal_entity"+std_logic_range(_param->_size_entity+1)+" = "+std_logic_conv(_param->_size_entity+1,i)+" else '0';");
35        vhdl->set_body ("");
36      }
37
38    if (_param->_encoding_compact)
39      {
40        string range = ((_param->_size_entity-1)==0)?"(0)":std_logic_range(_param->_size_entity-1,0);
41
42        vhdl->set_body ("out_ENTITY     <=     internal_entity"+range+";");
43        vhdl->set_body ("out_ENTITY_ACK <= not internal_entity"+std_logic_range(_param->_size_entity  ,_param->_size_entity)+";");
44      }   
45   
46    log_printf(FUNC,Select_Priority_Fixed,"vhdl_body","End");
47  };
48
49}; // end namespace select_priority_fixed
50}; // end namespace select
51}; // end namespace generic
52
53}; // end namespace behavioural
54}; // end namespace morpheo             
55#endif
Note: See TracBrowser for help on using the repository browser.