修复 vhdl 模块树更新错误
This commit is contained in:
parent
54b676ea9d
commit
78da956c67
27
resources/script/xilinx/program.tcl
Normal file
27
resources/script/xilinx/program.tcl
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
open_hw -quiet
|
||||
connect_hw_server -quiet
|
||||
set found 0
|
||||
foreach hw_target [get_hw_targets] {
|
||||
current_hw_target $hw_target
|
||||
open_hw_target -quiet
|
||||
foreach hw_device [get_hw_devices] {
|
||||
if { [string equal -length 6 [get_property PART $hw_device] xc7z020clg400-2] == 1 } {
|
||||
puts "------Successfully Found Hardware Target with a xc7z020clg400-2 device------ "
|
||||
current_hw_device $hw_device
|
||||
set found 1
|
||||
}
|
||||
}
|
||||
if {$found == 1} {break}
|
||||
close_hw_target
|
||||
}
|
||||
|
||||
#download the hw_targets
|
||||
if {$found == 0 } {
|
||||
puts "******ERROR : Did not find any Hardware Target with a xc7z020clg400-2 device****** "
|
||||
} else {
|
||||
set_property PROGRAM.FILE ./[current_project].bit [current_hw_device]
|
||||
program_hw_devices [current_hw_device] -quiet
|
||||
disconnect_hw_server -quiet
|
||||
}
|
||||
file delete /home/dide/project/Digital-IDE/resources/script/xilinx/program.tcl -force
|
@ -486,11 +486,11 @@ class HdlParam {
|
||||
}
|
||||
|
||||
for (const rawHdlModule of fast.content) {
|
||||
const moduleName = rawHdlModule.name;
|
||||
if (uncheckedModuleNames.has(moduleName)) {
|
||||
const renderName = moduleFile.makeKey(rawHdlModule.name, rawHdlModule.archName);
|
||||
if (uncheckedModuleNames.has(renderName)) {
|
||||
// match the same module, check then
|
||||
const originalModule = moduleFile.getHdlModule(moduleName);
|
||||
uncheckedModuleNames.delete(moduleName);
|
||||
const originalModule = moduleFile.getHdlModule(renderName);
|
||||
uncheckedModuleNames.delete(renderName);
|
||||
originalModule?.update(rawHdlModule);
|
||||
} else {
|
||||
// no matched, create it
|
||||
@ -1153,7 +1153,6 @@ export class HdlFile {
|
||||
// make nameToModule
|
||||
this.nameToModule = new Map<string, HdlModule>();
|
||||
|
||||
|
||||
for (const rawHdlModule of modules) {
|
||||
this.createHdlModule(rawHdlModule);
|
||||
}
|
||||
@ -1174,6 +1173,7 @@ export class HdlFile {
|
||||
}
|
||||
|
||||
public makeKey(name: string, archName: string | undefined): string {
|
||||
archName = archName ? archName: undefined;
|
||||
return archName === undefined ? name: `${name}(${archName})`;
|
||||
}
|
||||
|
||||
@ -1235,6 +1235,7 @@ export class HdlFile {
|
||||
|
||||
public deleteHdlModule(name: string) {
|
||||
let hdlModule = this.getHdlModule(name);
|
||||
|
||||
if (hdlModule) {
|
||||
// delete child reference in the module which use this
|
||||
for (const childInst of hdlModule.getAllGlobalRefers()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user