This commit is contained in:
锦恢 2024-02-29 18:55:05 +08:00
parent 3359396800
commit 7a16c7add2
3 changed files with 43 additions and 17 deletions

View File

@ -1,5 +1,7 @@
<template> <template>
<div class="vcd-wrapper"> <div class="vcd-render-wrapper" @mousemove="getMousemove">
</div>
<!-- 左上角的 sidebar用于显示 --> <!-- 左上角的 sidebar用于显示 -->
<Sidebar></Sidebar> <Sidebar></Sidebar>
@ -7,14 +9,10 @@
<div class="vcd-toolbar"> <div class="vcd-toolbar">
</div> </div>
<!-- 渲染区域 -->
<div class="vcd-render">
</div>
<!-- 显示当前信号树形关系 --> <!-- 显示当前信号树形关系 -->
<!-- 右侧工具合集 --> <!-- 右侧工具合集 -->
<RightNav :topModules="VcdInfo.topModules"></RightNav> <RightNav :topModules="VcdInfo.topModules"></RightNav>
</div>
</template> </template>
<script> <script>
@ -34,7 +32,7 @@ export default {
const VcdInfo = reactive({ const VcdInfo = reactive({
topModules: [], topModules: [],
values: [] values: [],
}); });
onMounted(async () => { onMounted(async () => {
@ -69,6 +67,12 @@ export default {
VcdInfo.topModules.push(topModule); VcdInfo.topModules.push(topModule);
} }
globalLookup.status = vcdstream.info.status;
globalLookup.version = vcdstream.info.version;
globalLookup.timescale = vcdstream.info.timescale;
globalLookup.date = vcdstream.info.date;
globalLookup.t0 = vcdstream.info.t0;
// //
// //
if (VcdInfo.topModules.length > 0) { if (VcdInfo.topModules.length > 0) {
@ -82,8 +86,13 @@ export default {
} }
}); });
function getMousemove(event) {
console.log(event);
}
return { return {
VcdInfo VcdInfo,
getMousemove
} }
} }
} }
@ -98,4 +107,9 @@ export default {
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.vcd-render-wrapper {
height: 98vh;
width: 98vw;
}
</style> </style>

View File

@ -12,6 +12,17 @@ const globalLookup = reactive({
// 当前选中的某个 信号 的 数据。可复选。 // 当前选中的某个 信号 的 数据。可复选。
currentWires: new Set(), currentWires: new Set(),
// 模拟器的版本,比如如果使用 iverilog 那么就是 Icarus Verilog
version: '',
// 创建时间
date: '',
// 状态 默认是 simulation
status: '',
// 单位时间
timescale: '',
// 初始时间,一般都是 0
t0: 0,
initcurrentModule(module) { initcurrentModule(module) {
if (this.currentModule === undefined && module) { if (this.currentModule === undefined && module) {
this.currentModule = module; this.currentModule = module;

View File

@ -93,6 +93,7 @@ function makeSearchResultItem(searchString, module, searchScope, caseSensitivity
}; };
} }
} }
return null; return null;
} }