From e24c11418cf6d6a9859fa522249915e6b816072e Mon Sep 17 00:00:00 2001 From: Michael Rogenmoser Date: Thu, 6 Apr 2023 19:08:32 +0200 Subject: [PATCH] script: Remove unused functions --- src/cmd/script.rs | 56 ----------------------------------------------- 1 file changed, 56 deletions(-) diff --git a/src/cmd/script.rs b/src/cmd/script.rs index ba1402ed..6a55cd12 100644 --- a/src/cmd/script.rs +++ b/src/cmd/script.rs @@ -378,10 +378,6 @@ enum SourceType { Vhdl, } -fn quote(s: &(impl std::fmt::Display + ?Sized)) -> String { - format!("\"{}\"", s) -} - fn relativize_path(path: &std::path::Path, root: &std::path::Path) -> String { if path.starts_with(root) { format!( @@ -395,58 +391,6 @@ fn relativize_path(path: &std::path::Path, root: &std::path::Path) -> String { static HEADER_AUTOGEN: &str = "This script was generated automatically by bender."; -fn header_tcl(sess: &Session) -> String { - let mut lines = vec![]; - lines.push(format!("# {}", HEADER_AUTOGEN)); - lines.push(format!("set ROOT {}", quote(sess.root.to_str().unwrap()))); - lines.join("\n") -} - -fn header_sh(sess: &Session) -> String { - let mut lines = vec![]; - lines.push("#!/usr/bin/env bash".to_string()); - lines.push(format!("# {}", HEADER_AUTOGEN)); - lines.push(format!("ROOT={}", quote(sess.root.to_str().unwrap()))); - lines.join("\n") -} - -fn tcl_catch_prefix(cmd: &str, do_prefix: bool) -> String { - let prefix = if do_prefix { "if {[catch {" } else { "" }; - format!("{}{}", prefix, cmd) -} - -fn tcl_catch_postfix() -> &'static str { - "}]} {return 1}" -} - -fn synopsys_dc_cmd(ty: SourceType) -> String { - format!( - "analyze -format {}", - match ty { - SourceType::Verilog => { - "sv" - } - SourceType::Vhdl => { - "vhdl" - } - } - ) -} - -fn synopsys_formality_cmd(ty: SourceType) -> String { - format!( - "{} -r", - match ty { - SourceType::Verilog => { - "read_sverilog" - } - SourceType::Vhdl => { - "read_vhdl" - } - } - ) -} - fn add_defines_from_matches(defines: &mut Vec<(String, Option)>, matches: &ArgMatches) { if let Some(d) = matches.get_many::("define") { defines.extend(d.map(|t| {