vhdlpp: Minor changes.
This commit is contained in:
parent
46ea9e6954
commit
7b483e69d8
|
|
@ -141,7 +141,8 @@ void preload_std_funcs(void)
|
||||||
fn_resize = new SubprogramSizeCast(perm_string::literal("resize"));
|
fn_resize = new SubprogramSizeCast(perm_string::literal("resize"));
|
||||||
std_subprograms[fn_resize->name()] = fn_resize;
|
std_subprograms[fn_resize->name()] = fn_resize;
|
||||||
|
|
||||||
/* function conv_std_logic_vector
|
/* std_logic_arith library
|
||||||
|
* function conv_std_logic_vector(arg: integer; size: integer) return std_logic_vector;
|
||||||
*/
|
*/
|
||||||
fn_conv_std_logic_vector = new SubprogramSizeCast(perm_string::literal("conv_std_logic_vector"));
|
fn_conv_std_logic_vector = new SubprogramSizeCast(perm_string::literal("conv_std_logic_vector"));
|
||||||
std_subprograms[fn_conv_std_logic_vector->name()] = fn_conv_std_logic_vector;
|
std_subprograms[fn_conv_std_logic_vector->name()] = fn_conv_std_logic_vector;
|
||||||
|
|
|
||||||
|
|
@ -21,9 +21,9 @@
|
||||||
#include "std_types.h"
|
#include "std_types.h"
|
||||||
#include "scope.h"
|
#include "scope.h"
|
||||||
|
|
||||||
static std::map<perm_string, VTypeDef*> std_types;
|
static map<perm_string, VTypeDef*> std_types;
|
||||||
// this list contains enums used by typedefs in the std_types map
|
// this list contains enums used by typedefs in the std_types map
|
||||||
static std::list<const VTypeEnum*> std_enums;
|
static list<const VTypeEnum*> std_enums;
|
||||||
|
|
||||||
const VTypePrimitive primitive_BIT(VTypePrimitive::BIT, true);
|
const VTypePrimitive primitive_BIT(VTypePrimitive::BIT, true);
|
||||||
const VTypePrimitive primitive_INTEGER(VTypePrimitive::INTEGER);
|
const VTypePrimitive primitive_INTEGER(VTypePrimitive::INTEGER);
|
||||||
|
|
@ -45,7 +45,7 @@ const VTypeArray primitive_UNSIGNED(&primitive_STDLOGIC, vector<VTypeArra
|
||||||
void generate_global_types(ActiveScope*res)
|
void generate_global_types(ActiveScope*res)
|
||||||
{
|
{
|
||||||
// boolean
|
// boolean
|
||||||
std::list<perm_string>*enum_BOOLEAN_vals = new std::list<perm_string>;
|
list<perm_string>*enum_BOOLEAN_vals = new list<perm_string>;
|
||||||
enum_BOOLEAN_vals->push_back(perm_string::literal("false"));
|
enum_BOOLEAN_vals->push_back(perm_string::literal("false"));
|
||||||
enum_BOOLEAN_vals->push_back(perm_string::literal("true"));
|
enum_BOOLEAN_vals->push_back(perm_string::literal("true"));
|
||||||
VTypeEnum*enum_BOOLEAN = new VTypeEnum(enum_BOOLEAN_vals);
|
VTypeEnum*enum_BOOLEAN = new VTypeEnum(enum_BOOLEAN_vals);
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ bool is_global_type(perm_string type_name);
|
||||||
void delete_global_types();
|
void delete_global_types();
|
||||||
const VTypeEnum*find_std_enum_name(perm_string name);
|
const VTypeEnum*find_std_enum_name(perm_string name);
|
||||||
|
|
||||||
extern const VTypePrimitive primitive_BOOLEAN;
|
|
||||||
extern const VTypePrimitive primitive_BIT;
|
extern const VTypePrimitive primitive_BIT;
|
||||||
extern const VTypePrimitive primitive_INTEGER;
|
extern const VTypePrimitive primitive_INTEGER;
|
||||||
extern const VTypePrimitive primitive_NATURAL;
|
extern const VTypePrimitive primitive_NATURAL;
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ int SubprogramBody::emit_package(ostream&fd) const
|
||||||
|
|
||||||
for (map<perm_string,Variable*>::const_iterator cur = new_variables_.begin()
|
for (map<perm_string,Variable*>::const_iterator cur = new_variables_.begin()
|
||||||
; cur != new_variables_.end() ; ++cur) {
|
; cur != new_variables_.end() ; ++cur) {
|
||||||
// Workaround to enable reg_flag for variables
|
// Enable reg_flag for variables
|
||||||
cur->second->count_ref_sequ();
|
cur->second->count_ref_sequ();
|
||||||
errors += cur->second->emit(fd, NULL, NULL);
|
errors += cur->second->emit(fd, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue