Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
MiniEDA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
MiniEDA
Commits
8b471d37
Commit
8b471d37
authored
Dec 27, 2022
by
lvzhengyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bugs of last commit
parent
0f90bd91
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
34 additions
and
34 deletions
+34
-34
src/db_mgr/CMakeLists.txt
+6
-0
src/db_mgr/include/db_mgr/db_mgr.h
+2
-4
src/db_mgr/src/db_mgr.cpp
+12
-10
src/db_mgr/src/db_mgr.i
+1
-3
src/db_mgr/src/db_mgr.tcl
+1
-1
src/db_mgr/src/parsers/verilog_parser/CMakeLists.txt
+0
-1
src/db_mgr/src/parsers/verilog_parser/verilog_database.cpp
+0
-11
src/db_mgr/src/parsers/verilog_parser/verilog_database.h
+0
-4
src/db_mgr/src/parsers/verilog_parser/verilog_parser.cpp
+10
-0
src/db_mgr/src/parsers/verilog_parser/verilog_parser.h
+2
-0
No files found.
src/db_mgr/CMakeLists.txt
View file @
8b471d37
...
@@ -28,3 +28,8 @@ target_link_libraries(db_mgr
...
@@ -28,3 +28,8 @@ target_link_libraries(db_mgr
PRIVATE
PRIVATE
db_mgr_verilog_parser
db_mgr_verilog_parser
)
)
# target_compile_options(db_mgr
# PRIVATE
# -D_GLIBCXX_USE_CXX11_ABI=0 # to avoid the std::string bug
# )
\ No newline at end of file
src/db_mgr/include/db_mgr/db_mgr.h
View file @
8b471d37
...
@@ -63,10 +63,8 @@ public:
...
@@ -63,10 +63,8 @@ public:
bool
cont_on_err
,
bool
cont_on_err
,
bool
is_floorplan
,
bool
is_floorplan
,
bool
is_incr
);
// incr: incremental
bool
is_incr
);
// incr: incremental
// bool readVerilog(const char* design_name,
bool
readVerilog
(
const
char
*
design_name
,
// const char* v_file);
const
char
*
v_file
);
bool
readVerilog
(
const
std
::
string
&
design_name
,
const
std
::
string
&
v_file
);
void
setCurrentBlock
(
const
char
*
design
);
void
setCurrentBlock
(
const
char
*
design
);
void
setCurrentBlock
(
odb
::
dbDatabase
*
db
);
void
setCurrentBlock
(
odb
::
dbDatabase
*
db
);
...
...
src/db_mgr/src/db_mgr.cpp
View file @
8b471d37
...
@@ -210,16 +210,14 @@ bool DbMgr::readBlockDef(const char* block_name,
...
@@ -210,16 +210,14 @@ bool DbMgr::readBlockDef(const char* block_name,
return
true
;
return
true
;
}
}
// bool DbMgr::readVerilog(const char* design_name,
bool
DbMgr
::
readVerilog
(
const
char
*
design_name
,
// const char* v_file)
const
char
*
v_file
)
bool
DbMgr
::
readVerilog
(
const
std
::
string
&
design_name
,
const
std
::
string
&
v_file
)
{
{
if
(
design_name
.
c_str
()
!=
nullptr
)
{
if
(
design_name
!=
nullptr
)
{
if
(
haveBlockDB
(
design_name
.
c_str
()
))
{
if
(
haveBlockDB
(
design_name
))
{
setCurrentBlock
(
design_name
.
c_str
()
);
setCurrentBlock
(
design_name
);
}
else
{
}
else
{
setCurrentBlock
(
createBlockDB
(
design_name
.
c_str
()
));
setCurrentBlock
(
createBlockDB
(
design_name
));
}
}
}
else
{
}
else
{
if
(
current_block_db_
==
nullptr
)
{
if
(
current_block_db_
==
nullptr
)
{
...
@@ -228,8 +226,12 @@ bool DbMgr::readVerilog(const std::string& design_name,
...
@@ -228,8 +226,12 @@ bool DbMgr::readVerilog(const std::string& design_name,
}
}
}
}
verilog_parser_
->
setOdb
(
current_block_db_
);
verilog_parser_
->
setOdb
(
current_block_db_
);
return
true
;
/*
// return verilog_parser_->read(design_name, v_file);
const std::string design_name_str(design_name, std::strlen(design_name));
const std::string v_file_str(v_file, std::strlen(v_file));
return verilog_parser_->read(design_name_str, v_file_str);
*/
return
verilog_parser_
->
read
(
design_name
,
v_file
);
}
}
}
// namespace db_mgr
}
// namespace db_mgr
...
...
src/db_mgr/src/db_mgr.i
View file @
8b471d37
...
@@ -36,12 +36,10 @@ bool delete_blk_db(const char* block_name)
...
@@ -36,12 +36,10 @@ bool delete_blk_db(const char* block_name)
return getDbMgr()->deleteBlockDB(block_name);
return getDbMgr()->deleteBlockDB(block_name);
}
}
/*
bool read_verilog(const char* design, const char* v_file)
bool read_verilog(const std::string& design, const std::string& v_file)
{
{
return getDbMgr()->readVerilog(design, v_file);
return getDbMgr()->readVerilog(design, v_file);
}
}
*/
} // namespace db_mgr
} // namespace db_mgr
...
...
src/db_mgr/src/db_mgr.tcl
View file @
8b471d37
...
@@ -61,5 +61,5 @@ proc read_verilog { args } {
...
@@ -61,5 +61,5 @@ proc read_verilog { args } {
set design
$keys
(
-design
)
set design
$keys
(
-design
)
}
}
set filename
[
file
nativename
[
lindex
$args
0
]]
set filename
[
file
nativename
[
lindex
$args
0
]]
#
db_mgr::read_verilog
$design
$filename
db_mgr::read_verilog
$design
$filename
}
}
src/db_mgr/src/parsers/verilog_parser/CMakeLists.txt
View file @
8b471d37
...
@@ -4,7 +4,6 @@ target_sources(db_mgr_verilog_parser
...
@@ -4,7 +4,6 @@ target_sources(db_mgr_verilog_parser
PRIVATE
PRIVATE
${
CMAKE_CURRENT_SOURCE_DIR
}
/verilog_database.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/verilog_database.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/verilog_parser.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/verilog_parser.cpp
${
CMAKE_CURRENT_SOURCE_DIR
}
/test_bison.cpp
)
)
target_include_directories
(
db_mgr_verilog_parser
target_include_directories
(
db_mgr_verilog_parser
...
...
src/db_mgr/src/parsers/verilog_parser/verilog_database.cpp
View file @
8b471d37
...
@@ -24,17 +24,6 @@ VDb::~VDb()
...
@@ -24,17 +24,6 @@ VDb::~VDb()
current_module_
=
nullptr
;
current_module_
=
nullptr
;
}
}
/*
bool VDb::read(const std::string& design_name,
const std::string& v_file)
{
if (current_block_->getConstName() != design_name) {
return false;
}
return VerilogParser::read(*this, v_file);
}
*/
void
VDb
::
setOdb
(
odb
::
dbDatabase
*
odb
)
void
VDb
::
setOdb
(
odb
::
dbDatabase
*
odb
)
{
{
odb_
=
odb
;
odb_
=
odb
;
...
...
src/db_mgr/src/parsers/verilog_parser/verilog_database.h
View file @
8b471d37
...
@@ -20,10 +20,6 @@ public:
...
@@ -20,10 +20,6 @@ public:
VDb
();
VDb
();
VDb
(
odb
::
dbDatabase
*
odb
);
VDb
(
odb
::
dbDatabase
*
odb
);
~
VDb
();
~
VDb
();
/*
bool read(const std::string& design_name,
const std::string& v_file);
*/
void
setOdb
(
odb
::
dbDatabase
*
odb
);
void
setOdb
(
odb
::
dbDatabase
*
odb
);
void
setLogger
(
utl
::
Logger
*
logger
);
void
setLogger
(
utl
::
Logger
*
logger
);
...
...
src/db_mgr/src/parsers/verilog_parser/verilog_parser.cpp
View file @
8b471d37
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
#include "utl/Logger.h"
#include "utl/Logger.h"
#include "db.h"
#include "db.h"
#include <cstring>
#define _GLIBCXX_USE_CXX11_ABI 0
#define _GLIBCXX_USE_CXX11_ABI 0
namespace
eda
{
namespace
eda
{
...
@@ -31,6 +33,14 @@ void VParser::setOdb(odb::dbDatabase* db)
...
@@ -31,6 +33,14 @@ void VParser::setOdb(odb::dbDatabase* db)
}
}
}
}
bool
VParser
::
read
(
const
char
*
design_name
,
const
char
*
v_file
)
{
std
::
string
design_name_str
(
design_name
,
std
::
strlen
(
design_name
));
std
::
string
v_file_str
(
v_file
,
std
::
strlen
(
v_file
));
return
read
(
design_name_str
,
v_file_str
);
}
bool
VParser
::
read
(
std
::
string
const
&
design_name
,
bool
VParser
::
read
(
std
::
string
const
&
design_name
,
std
::
string
const
&
v_file
)
std
::
string
const
&
v_file
)
{
{
...
...
src/db_mgr/src/parsers/verilog_parser/verilog_parser.h
View file @
8b471d37
...
@@ -28,6 +28,8 @@ public:
...
@@ -28,6 +28,8 @@ public:
~
VParser
();
~
VParser
();
bool
read
(
std
::
string
const
&
design_name
,
bool
read
(
std
::
string
const
&
design_name
,
std
::
string
const
&
v_file
);
std
::
string
const
&
v_file
);
bool
read
(
const
char
*
design_name
,
const
char
*
v_file
);
void
setLogger
(
utl
::
Logger
*
logger
);
void
setLogger
(
utl
::
Logger
*
logger
);
void
setOdb
(
odb
::
dbDatabase
*
db
);
void
setOdb
(
odb
::
dbDatabase
*
db
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment