mirror of
https://github.com/YosysHQ/yosys.git
synced 2026-10-07 18:43:22 +02:00
chores: first pass of fixes spaces to tabs
This commit is contained in:
@@ -1331,9 +1331,9 @@ static RTLIL::Module *process_module(RTLIL::Design *design, AstNode *ast, bool d
|
||||
|
||||
RTLIL::Module *
|
||||
AST_INTERNAL::process_and_replace_module(RTLIL::Design *design,
|
||||
RTLIL::Module *old_module,
|
||||
AST::AstNode *new_ast,
|
||||
std::unique_ptr<AstNode> original_ast)
|
||||
RTLIL::Module *old_module,
|
||||
AST::AstNode *new_ast,
|
||||
std::unique_ptr<AstNode> original_ast)
|
||||
{
|
||||
// The old module will be deleted. Rename and mark for deletion, using
|
||||
// a static counter to make sure we get a unique name.
|
||||
|
||||
@@ -25,8 +25,8 @@ YOSYS_NAMESPACE_BEGIN
|
||||
using namespace AST_INTERNAL;
|
||||
|
||||
AST::Binding::Binding(RTLIL::IdString target_type,
|
||||
RTLIL::IdString target_name,
|
||||
const AstNode &cell)
|
||||
RTLIL::IdString target_name,
|
||||
const AstNode &cell)
|
||||
: RTLIL::Binding(target_type, target_name),
|
||||
ast_node(cell.clone())
|
||||
{
|
||||
|
||||
+18
-18
@@ -103,26 +103,26 @@ std::unique_ptr<AST::AstNode> AST::dpi_call(AstSrcLocType loc, const std::string
|
||||
}
|
||||
}
|
||||
|
||||
if (rtype == "integer") {
|
||||
types[args.size()] = &ffi_type_slong;
|
||||
values[args.size()] = &value_store[args.size()].i32;
|
||||
} else if (rtype == "shortreal") {
|
||||
types[args.size()] = &ffi_type_float;
|
||||
values[args.size()] = &value_store[args.size()].f32;
|
||||
} else if (rtype == "real") {
|
||||
types[args.size()] = &ffi_type_double;
|
||||
values[args.size()] = &value_store[args.size()].f64;
|
||||
} else if (rtype == "chandle") {
|
||||
types[args.size()] = &ffi_type_pointer;
|
||||
values[args.size()] = &value_store[args.size()].ptr;
|
||||
} else {
|
||||
log_error("invalid rtype '%s'.\n", rtype);
|
||||
}
|
||||
if (rtype == "integer") {
|
||||
types[args.size()] = &ffi_type_slong;
|
||||
values[args.size()] = &value_store[args.size()].i32;
|
||||
} else if (rtype == "shortreal") {
|
||||
types[args.size()] = &ffi_type_float;
|
||||
values[args.size()] = &value_store[args.size()].f32;
|
||||
} else if (rtype == "real") {
|
||||
types[args.size()] = &ffi_type_double;
|
||||
values[args.size()] = &value_store[args.size()].f64;
|
||||
} else if (rtype == "chandle") {
|
||||
types[args.size()] = &ffi_type_pointer;
|
||||
values[args.size()] = &value_store[args.size()].ptr;
|
||||
} else {
|
||||
log_error("invalid rtype '%s'.\n", rtype);
|
||||
}
|
||||
|
||||
if ((status = ffi_prep_cif(&cif, FFI_DEFAULT_ABI, args.size(), types[args.size()], types.data())) != FFI_OK)
|
||||
log_error("ffi_prep_cif failed: status %d.\n", status);
|
||||
if ((status = ffi_prep_cif(&cif, FFI_DEFAULT_ABI, args.size(), types[args.size()], types.data())) != FFI_OK)
|
||||
log_error("ffi_prep_cif failed: status %d.\n", status);
|
||||
|
||||
ffi_call(&cif, resolve_fn(fname.c_str()), values[args.size()], values.data());
|
||||
ffi_call(&cif, resolve_fn(fname.c_str()), values[args.size()], values.data());
|
||||
|
||||
if (rtype == "real") {
|
||||
newNode = std::make_unique<AstNode>(loc, AST_REALVALUE);
|
||||
|
||||
@@ -39,12 +39,12 @@ YOSYS_NAMESPACE_BEGIN
|
||||
|
||||
#if defined(_WIN32)
|
||||
static std::wstring str2wstr(const std::string &in) {
|
||||
if(in == "") return L"";
|
||||
std::wstring out;
|
||||
out.resize(MultiByteToWideChar(/*CodePage=*/CP_UTF8, /*dwFlags=*/0, /*lpMultiByteStr=*/&in[0], /*cbMultiByte=*/(int)in.length(), /*lpWideCharStr=*/NULL, /*cchWideChar=*/0));
|
||||
int written = MultiByteToWideChar(/*CodePage=*/CP_UTF8, /*dwFlags=*/0, /*lpMultiByteStr=*/&in[0], /*cbMultiByte=*/(int)in.length(), /*lpWideCharStr=*/&out[0], /*cchWideChar=*/(int)out.length());
|
||||
log_assert(written == (int)out.length());
|
||||
return out;
|
||||
if(in == "") return L"";
|
||||
std::wstring out;
|
||||
out.resize(MultiByteToWideChar(/*CodePage=*/CP_UTF8, /*dwFlags=*/0, /*lpMultiByteStr=*/&in[0], /*cbMultiByte=*/(int)in.length(), /*lpWideCharStr=*/NULL, /*cchWideChar=*/0));
|
||||
int written = MultiByteToWideChar(/*CodePage=*/CP_UTF8, /*dwFlags=*/0, /*lpMultiByteStr=*/&in[0], /*cbMultiByte=*/(int)in.length(), /*lpWideCharStr=*/&out[0], /*cchWideChar=*/(int)out.length());
|
||||
log_assert(written == (int)out.length());
|
||||
return out;
|
||||
}
|
||||
|
||||
static std::string wstr2str(const std::wstring &in) {
|
||||
|
||||
@@ -644,8 +644,8 @@ read_define_args()
|
||||
// "`define".
|
||||
static void
|
||||
read_define(const std::string &filename,
|
||||
define_map_t &defines_map,
|
||||
define_map_t &global_defines_cache)
|
||||
define_map_t &defines_map,
|
||||
define_map_t &global_defines_cache)
|
||||
{
|
||||
std::string name, value;
|
||||
arg_map_t args;
|
||||
@@ -747,12 +747,12 @@ read_define(const std::string &filename,
|
||||
|
||||
std::string
|
||||
frontend_verilog_preproc(std::istream &f,
|
||||
std::string filename,
|
||||
const define_map_t &pre_defines,
|
||||
define_map_t &global_defines_cache,
|
||||
const std::list<std::string> &include_dirs,
|
||||
ParseState &parse_state,
|
||||
ParseMode &parse_mode)
|
||||
std::string filename,
|
||||
const define_map_t &pre_defines,
|
||||
define_map_t &global_defines_cache,
|
||||
const std::list<std::string> &include_dirs,
|
||||
ParseState &parse_state,
|
||||
ParseMode &parse_mode)
|
||||
{
|
||||
define_map_t defines;
|
||||
defines.merge(pre_defines);
|
||||
|
||||
@@ -73,12 +73,12 @@ struct define_map_t;
|
||||
|
||||
std::string
|
||||
frontend_verilog_preproc(std::istream &f,
|
||||
std::string filename,
|
||||
const define_map_t &pre_defines,
|
||||
define_map_t &global_defines_cache,
|
||||
const std::list<std::string> &include_dirs,
|
||||
VERILOG_FRONTEND::ParseState &parse_state,
|
||||
VERILOG_FRONTEND::ParseMode &parse_mode);
|
||||
std::string filename,
|
||||
const define_map_t &pre_defines,
|
||||
define_map_t &global_defines_cache,
|
||||
const std::list<std::string> &include_dirs,
|
||||
VERILOG_FRONTEND::ParseState &parse_state,
|
||||
VERILOG_FRONTEND::ParseMode &parse_mode);
|
||||
|
||||
YOSYS_NAMESPACE_END
|
||||
|
||||
|
||||
@@ -48,10 +48,10 @@ static std::list<std::vector<std::string>> verilog_defaults_stack;
|
||||
|
||||
static void error_on_dpi_function(AST::AstNode *node)
|
||||
{
|
||||
if (node->type == AST::AST_DPI_FUNCTION)
|
||||
err_at_loc(node->location, "Found DPI function %s.\n", node->str);
|
||||
for (auto& child : node->children)
|
||||
error_on_dpi_function(child.get());
|
||||
if (node->type == AST::AST_DPI_FUNCTION)
|
||||
err_at_loc(node->location, "Found DPI function %s.\n", node->str);
|
||||
for (auto& child : node->children)
|
||||
error_on_dpi_function(child.get());
|
||||
}
|
||||
|
||||
static void add_package_types(dict<std::string, AST::AstNode *> &user_types, std::vector<std::unique_ptr<AST::AstNode>> &package_list)
|
||||
|
||||
Reference in New Issue
Block a user