Code Snippets Tcl

Short texts Tcl πŸ§‘β€πŸ’» Code snippets Tcl ✍️ Reading lists Tcl πŸ‘€

GTKWave TCL script to colorize and group signals for Chisel projects

set tmpdir $::env(PATH) puts $tmpdir set nsigs [ gtkwave::getNumFacs ] set sigs [list] # Beautification – View settings gtkwave::/Edit/Set_Trace_Max_Hier 0 gtkwave::/View/Show_Filled_High_Values 1 gtkwave::/View/Show_Wave_Highlight 1 gtkwave::/View/Show_Mouseover 1 gtkwave::nop # Add TOPLevel clock and reset signals set top [list CPU.clock CPU.reset ] gtkwave::addSignalsFromList $top gtkwave::highlightSignalsFromList $top gtkwave::/Edit/Color_Format/Indigo gtkwave::/Edit/UnHighlight_All gtkwave::/Edit/Insert_Blank gtkwave::cbTreeExpand proc add_signals { nsigs filter color} { […]

logCount.tcl

#logCount #logCount.tcl ##=================================================================== # Copyright (c) 2021 Yuji SODE # # This software is released under the MIT License. # See LICENSE or http://opensource.org/licenses/mit-license.php ##=================================================================== # #=== === namespace eval ::logCount { # #=== variables === # #an array of frequencies variable FREQS;array set FREQS {}; # #$base = none or NONE -> original value […]

bsc-libdir.tcl

#! /usr/bin/env bluetcl # bsc-libdir: a tcl script that looks up Verilog primitives for # the bluespec compiler, and emits them to stdout. this tool # is more useful when combined with `bsc-rpc`, but might be # of use on its own. # # usage: # # $ bluetcl bsc-libdir RegUN > RegUN.v # $ […]

21 year old tkirc script to prevent takeover via netsplit on irc…

################################################ # teh – op 0.2 # Christian Bednarek 01.09.2000 (00:40) # —————————– # Diese tkirc-extension versucht (;-), bei netjoins von Servern # gesetzte Modes aufzuheben. # # Befehle: # /ton – script einschalten # /toff – script ausschalten # /topsets – prefs anzeigen # Konfiguration: # # set eazy_sm_list { # { #kanal {Liste […]

ζ–‡ζœ¬ζ–‡δ»Άε€„η† for Tcler : ηœ‹δΈ€δΊ›δΎ‹ε­

package require Tcl proc collext-text-block {line -begin pattern_begin -end pattern_end -buffer listvar body} { global inside_block global lines_buffer if ![info exists inside_block] { set inside_block 0 set lines_buffer [] } if {$inside_block} { lappend lines_buffer $line if [regexp $pattern_end $line] { set inside_block 0 uplevel 1 [list apply [list [list $listvar] $body] $lines_buffer] } } […]