Skip to content

Commit 07a0f34

Browse files
std::string for t_arch:architecture_id
1 parent 34bb767 commit 07a0f34

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

libs/libarchfpga/src/arch_util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ void free_arch(t_arch* arch) {
162162

163163
vtr::release_memory(arch->directs);
164164

165-
vtr::free(arch->architecture_id);
165+
vtr::release_memory(arch->architecture_id);
166166

167167
delete (arch->noc);
168168
}

libs/libarchfpga/src/physical_types.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,7 +1966,7 @@ struct t_arch {
19661966
std::vector<vtr::interned_string> interned_strings;
19671967

19681968
/// Secure hash digest of the architecture file to uniquely identify this architecture
1969-
char* architecture_id;
1969+
std::string architecture_id;
19701970

19711971
// Options for tileable routing architectures
19721972
// These are used for an alternative, tilable, rr-graph generator that can produce
@@ -2001,12 +2001,12 @@ struct t_arch {
20012001
int sub_fs;
20022002

20032003
/// Connecting type for pass tracks in each switch block
2004-
enum e_switch_block_type sb_sub_type;
2004+
e_switch_block_type sb_sub_type;
20052005

20062006
// End of tileable architecture options
20072007

20082008
t_chan_width_dist Chans;
2009-
enum e_switch_block_type sb_type;
2009+
e_switch_block_type sb_type;
20102010
std::vector<t_switchblock_inf> switchblocks;
20112011
float R_minW_nmos;
20122012
float R_minW_pmos;

libs/libarchfpga/src/read_fpga_interchange_arch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2529,7 +2529,7 @@ void FPGAInterchangeReadArch(const char* FPGAInterchangeDeviceFile,
25292529

25302530
auto device_reader = message_reader.getRoot<DeviceResources::Device>();
25312531

2532-
arch->architecture_id = vtr::strdup(vtr::secure_digest_file(FPGAInterchangeDeviceFile).c_str());
2532+
arch->architecture_id = vtr::secure_digest_file(FPGAInterchangeDeviceFile);
25332533

25342534
ArchReader reader(arch, device_reader, FPGAInterchangeDeviceFile, PhysicalTileTypes, LogicalBlockTypes);
25352535
reader.read_arch();

libs/libarchfpga/src/read_xml_arch_file.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ void xml_read_arch(const char* arch_file,
409409
}
410410

411411
//Create a unique identifier for this architecture file based on it's contents
412-
arch->architecture_id = vtr::strdup(vtr::secure_digest_file(arch_file).c_str());
412+
arch->architecture_id = vtr::secure_digest_file(arch_file);
413413

414414
// Parse the file
415415
try {

0 commit comments

Comments
 (0)