vhdlpp: Minor changes.

This commit is contained in:
Maciej Suminski 2015-09-23 11:53:00 +02:00
parent 46ea9e6954
commit 7b483e69d8
4 changed files with 6 additions and 6 deletions

View File

@ -141,7 +141,8 @@ void preload_std_funcs(void)
fn_resize = new SubprogramSizeCast(perm_string::literal("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"));
std_subprograms[fn_conv_std_logic_vector->name()] = fn_conv_std_logic_vector;

View File

@ -21,9 +21,9 @@
#include "std_types.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
static std::list<const VTypeEnum*> std_enums;
static list<const VTypeEnum*> std_enums;
const VTypePrimitive primitive_BIT(VTypePrimitive::BIT, true);
const VTypePrimitive primitive_INTEGER(VTypePrimitive::INTEGER);
@ -45,7 +45,7 @@ const VTypeArray primitive_UNSIGNED(&primitive_STDLOGIC, vector<VTypeArra
void generate_global_types(ActiveScope*res)
{
// 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("true"));
VTypeEnum*enum_BOOLEAN = new VTypeEnum(enum_BOOLEAN_vals);

View File

@ -29,7 +29,6 @@ bool is_global_type(perm_string type_name);
void delete_global_types();
const VTypeEnum*find_std_enum_name(perm_string name);
extern const VTypePrimitive primitive_BOOLEAN;
extern const VTypePrimitive primitive_BIT;
extern const VTypePrimitive primitive_INTEGER;
extern const VTypePrimitive primitive_NATURAL;

View File

@ -31,7 +31,7 @@ int SubprogramBody::emit_package(ostream&fd) const
for (map<perm_string,Variable*>::const_iterator cur = new_variables_.begin()
; cur != new_variables_.end() ; ++cur) {
// Workaround to enable reg_flag for variables
// Enable reg_flag for variables
cur->second->count_ref_sequ();
errors += cur->second->emit(fd, NULL, NULL);
}