Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/interface/tcl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ add_subdirectory(tcl_icts)
add_subdirectory(tcl_idrc)
add_subdirectory(tcl_instance)
add_subdirectory(tcl_irt)
add_subdirectory(tcl_ircx)
add_subdirectory(tcl_ifp)
add_subdirectory(tcl_ipdn)
add_subdirectory(tcl_ipnp)
Expand Down Expand Up @@ -43,7 +44,8 @@ target_link_libraries(ieda_tcl
tcl_flow
tcl_icts
tcl_idrc
tcl_irt
tcl_irt
tcl_ircx
tcl_ifp
tcl_ipdn
tcl_inst
Expand Down
14 changes: 14 additions & 0 deletions src/interface/tcl/tcl_ircx/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
add_library(tcl_ircx INTERFACE)

target_link_libraries(tcl_ircx
INTERFACE
tool_manager
tcl
rcx_shell_cmd
str
)

target_include_directories(tcl_ircx
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}
)
50 changes: 50 additions & 0 deletions src/interface/tcl/tcl_ircx/tcl_register_ircx.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// ***************************************************************************************
// Copyright (c) 2023-2025 Peng Cheng Laboratory
// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences
// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip
//
// iEDA is licensed under Mulan PSL v2.
// You can use this software according to the terms and conditions of the Mulan PSL v2.
// You may obtain a copy of Mulan PSL v2 at:
// http://license.coscl.org.cn/MulanPSL2
//
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
//
// See the Mulan PSL v2 for more details.
// ***************************************************************************************
#pragma once
/**
* @File Name: tcl_register_rcx.h
* @Brief :
* @Author : Yipei Xu (yipeix@163.com)
* @Version : 1.0
* @Creat Date : 2025-12-08
*
*/
#include "ScriptEngine.hh"
#include "UserShell.hh"

#define TCL_USERSHELL

#ifdef TCL_USERSHELL
#include "rcxShellCmd.hh"
#endif

using namespace ieda;

namespace tcl {
int registerCmdRCX()
{
registerTclCmd(ircx::CmdRCXRun, "run_rcx");
registerTclCmd(ircx::CmdRCXInit, "init_rcx");
registerTclCmd(ircx::CmdRCXReport, "report_rcx");

registerTclCmd(ircx::CmdReadCorner, "read_corner");
registerTclCmd(ircx::CmdReadMapping, "read_mapping");

return EXIT_SUCCESS;
}

} // namespace tcl
4 changes: 4 additions & 0 deletions src/interface/tcl/tcl_register.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include "tcl_register_idrc.h"
#include "tcl_register_inst.h"
#include "tcl_register_irt.h"
#include "tcl_register_ircx.h"
#include "tcl_register_no.h"
#include "tcl_register_pdn.h"
#include "tcl_register_pl.h"
Expand Down Expand Up @@ -98,6 +99,9 @@ int registerCommands()
/// DRC
registerCmdDRC();

/// RCX
registerCmdRCX();

/// STA
registerCmdSTA();

Expand Down
1 change: 1 addition & 0 deletions src/operation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ add_subdirectory(iPDN)
add_subdirectory(iPNP)
add_subdirectory(iPL)
add_subdirectory(iRT)
add_subdirectory(iRCX)
add_subdirectory(iSTA)
add_subdirectory(iPA)
add_subdirectory(iTO)
Expand Down
3 changes: 3 additions & 0 deletions src/operation/iRCX/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Language: Cpp
BasedOnStyle: Google
PointerAlignment: Left
49 changes: 49 additions & 0 deletions src/operation/iRCX/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
if(TEST_SHELL)
add_definitions(-DTEST_SHELL)
endif()

# ADD_COMPILE_OPTIONS("-fsanitize=address") LINK_LIBRARIES("-fsanitize=address")

add_library(ircx_headers INTERFACE)

target_compile_features(ircx_headers INTERFACE cxx_std_20)

target_include_directories(ircx_headers
INTERFACE
${HOME_UTILITY}
${HOME_UTILITY}/log
${HOME_UTILITY}/stdBase
${HOME_UTILITY}/stdBase/include
${HOME_OPERATION}/iRCX
${HOME_OPERATION}/iRCX/api
${HOME_OPERATION}/iRCX/source/module
${HOME_OPERATION}/iRCX/source/module/database
${HOME_OPERATION}/iRCX/source/module/environment
${HOME_OPERATION}/iRCX/source/module/extract
${HOME_OPERATION}/iRCX/source/module/extract/capacitance
${HOME_OPERATION}/iRCX/source/module/extract/resistance
${HOME_OPERATION}/iRCX/source/module/process
${HOME_OPERATION}/iRCX/source/module/report
${HOME_OPERATION}/iRCX/source/module/shell_cmd
${HOME_OPERATION}/iRCX/source/module/topology
${HOME_OPERATION}/iRCX/source/parser
${HOME_OPERATION}/iRCX/source/parser/cap_table
${HOME_OPERATION}/iRCX/source/parser/itf
${HOME_OPERATION}/iRCX/source/parser/itf_builder
${HOME_OPERATION}/iRCX/source/parser/itf_data
${HOME_OPERATION}/iRCX/source/parser/mapping
)

target_include_directories(ircx_headers
SYSTEM INTERFACE
${HOME_THIRDPARTY}
)

add_subdirectory(api)
add_subdirectory(source/module/topology)
add_subdirectory(source/module/environment)
add_subdirectory(source/module/process)
add_subdirectory(source/module/extract)
add_subdirectory(source/module/report)
add_subdirectory(source/module/shell_cmd)
add_subdirectory(source/parser)
22 changes: 22 additions & 0 deletions src/operation/iRCX/api/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
set(IRCX_ENGINE_SRC
ParasiticXEngine.cpp
ParasiticXIDBAdapter.cpp
)

add_library(ircx_engine ${IRCX_ENGINE_SRC})

target_link_libraries(ircx_engine
PUBLIC
IdbBuilder
ircx_headers
PRIVATE
def_service
idb
lef_service
log
)

target_include_directories(ircx_engine
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
44 changes: 44 additions & 0 deletions src/operation/iRCX/api/ParasiticXEngine.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// ***************************************************************************************
// Copyright (c) 2023-2025 Peng Cheng Laboratory
// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences
// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip
//
// iEDA is licensed under Mulan PSL v2.
// You can use this software according to the terms and conditions of the Mulan PSL v2.
// You may obtain a copy of Mulan PSL v2 at:
// http://license.coscl.org.cn/MulanPSL2
//
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
//
// See the Mulan PSL v2 for more details.
// ***************************************************************************************
#include <mutex>

#include "ParasiticXEngine.hpp"
namespace ircx {

ParasiticXEngine* ParasiticXEngine::_instance = nullptr;

ParasiticXEngine* ParasiticXEngine::get_or_create_parasitic_x_engine()
{
static std::mutex mutex;
if (_instance == nullptr) {
std::lock_guard<std::mutex> lock(mutex);
if (_instance == nullptr) {
_instance = new ParasiticXEngine();
}
}
return _instance;
}

void ParasiticXEngine::destroyParasiticXEngine()
{
delete _instance;
}

ParasiticXEngine::ParasiticXEngine() : _rcx(nullptr), _db_adapter(nullptr) {}


} // namespace ircx
60 changes: 60 additions & 0 deletions src/operation/iRCX/api/ParasiticXEngine.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// ***************************************************************************************
// Copyright (c) 2023-2025 Peng Cheng Laboratory
// Copyright (c) 2023-2025 Institute of Computing Technology, Chinese Academy of Sciences
// Copyright (c) 2023-2025 Beijing Institute of Open Source Chip
//
// iEDA is licensed under Mulan PSL v2.
// You can use this software according to the terms and conditions of the Mulan PSL v2.
// You may obtain a copy of Mulan PSL v2 at:
// http://license.coscl.org.cn/MulanPSL2
//
// THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
// MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
//
// See the Mulan PSL v2 for more details.
// ***************************************************************************************
#pragma once

namespace ircx {

class RCX;
class ParasiticXDBAdapter;

// Database Adapter
class ParasiticXEngine {
public:
// Get or create singleton instance
static ParasiticXEngine* get_or_create_parasitic_x_engine();

// Destroy singleton instance
static void destroyParasiticXEngine();

// getter
[[nodiscard]] RCX* get_rcx() const { return _rcx; }
[[nodiscard]] ParasiticXDBAdapter* get_db_adapter() const { return _db_adapter; }

// setter
void set_rcx(RCX* rcx) { _rcx = rcx; }
void set_db_adapter(ParasiticXDBAdapter* db_adapter) { _db_adapter = db_adapter; }

// Disallow copy and move
ParasiticXEngine(const ParasiticXEngine&) = delete;
void operator=(const ParasiticXEngine&) = delete;
ParasiticXEngine(ParasiticXEngine&&) = delete;
void operator=(ParasiticXEngine&&) = delete;

private:
// Private constructor for singleton
ParasiticXEngine();
~ParasiticXEngine() = default;

// Singleton instance
static ParasiticXEngine* _instance;

// members
RCX* _rcx;
ParasiticXDBAdapter* _db_adapter;
};

} // namespace ircx
Loading
Loading