logo Netzschleuder network catalog, repository, and centrifuge

History of iscas89_circuits

The changes to the source code of this entry in the repository, newest first, each with the differences it made to the entry's files. They are also listed on GitLab.

[entries] Remove superfluous details of the upstream distribution from the descriptions by Tiago de Paula Peixoto dc07aa0
The descriptions mentioned incidental details of how the upstream data
are made available: the file formats (CSV, JSON, XML, GEXF, SBML, HIF,
Pajek, UCINET, ...), file names, where the files were published or
obtained from (Zenodo, figshare, Kaggle, the Pajek datasets page, the
Internet Archive), and that some networks are only available in the gt
format. These are left out; caveats about the data themselves are kept,
referring to "the data" instead of "the file". The description of
sp_baboons now lists its properties instead of the upstream columns,
and says that events without a recipient are left out.
diff --git a/entries/iscas89_circuits/__init__.py b/entries/iscas89_circuits/__init__.py
index de39484..1556c8b 100644
--- a/entries/iscas89_circuits/__init__.py
+++ b/entries/iscas89_circuits/__init__.py
@@ -20,7 +20,7 @@ from .. import *
 import re
 
 title = "ISCAS'89 sequential benchmark circuits (1989)"
-description = """Networks of the digital logic circuits of the ISCAS'89 benchmark set, a collection of sequential circuits (i.e. with memory elements) introduced by Brglez, Bryan and Kozminski at the 1989 International Symposium on Circuits and Systems and widely used to evaluate test generation, simulation and synthesis algorithms. The circuits are given in the ".bench" netlist format, as distributed by M. S. Hsiao (Virginia Tech). Each network (named after the circuit, e.g. `s27` or `s38584.1`) represents one circuit: nodes are signals, i.e. the primary inputs of the circuit and the outputs of its logic gates and D-type flip-flops, and a directed edge $u \\to v$ indicates that signal $u$ is an input of the gate or flip-flop whose output is $v$. The circuits range from a few dozen to about 25,000 gates. The circuit s208.1, listed in the source, is not included as its file was not available.
+description = """Networks of the digital logic circuits of the ISCAS'89 benchmark set, a collection of sequential circuits (i.e. with memory elements) introduced by Brglez, Bryan and Kozminski at the 1989 International Symposium on Circuits and Systems and widely used to evaluate test generation, simulation and synthesis algorithms. Each network (named after the circuit, e.g. `s27` or `s38584.1`) represents one circuit: nodes are signals, i.e. the primary inputs of the circuit and the outputs of its logic gates and D-type flip-flops, and a directed edge $u \\to v$ indicates that signal $u$ is an input of the gate or flip-flop whose output is $v$. The circuits range from a few dozen to about 25,000 gates. The circuit s208.1 is not included, as its data were not available.
 
 The networks have the following properties:
 
[entries] Add the date when each entry was added, and remove icon_hash by Tiago de Paula Peixoto beff7c9
The dates are those of the commits that first added the entries' files
(2020-08-11 for the entries of the initial commit); renamed entries keep
the date of their first name.

Changed: none
diff --git a/entries/iscas89_circuits/__init__.py b/entries/iscas89_circuits/__init__.py
index 3a3a7e6..de39484 100644
--- a/entries/iscas89_circuits/__init__.py
+++ b/entries/iscas89_circuits/__init__.py
@@ -31,7 +31,7 @@ tags = ['Technological', 'Unweighted', 'Metadata']
 url = ['https://web.archive.org/web/20130903053523/http://filebox.ece.vt.edu/~mhsiao/iscas89.html',
        'http://www.cbl.ncsu.edu/']
 citation = [('F. Brglez, D. Bryan, K. Kozminski, "Combinational profiles of sequential benchmark circuits." IEEE International Symposium on Circuits and Systems, 1929-1934 (1989)', 'https://doi.org/10.1109/ISCAS.1989.100747')]
-icon_hash = '56a85c8e26855e083a2f795e'
+date_added = '2026-10-25'
 upstream_license = None
 # The files are no longer online; they are obtained from the Internet
 # Archive.
[entries] Prefix the properties in the descriptions with (Node), (Edge) or (Graph) by Tiago de Paula Peixoto bc3dbbd
The lists of properties at the end of the descriptions marked edge
properties with "Edge" but left node properties unmarked, or grouped
them in "Nodes: `a`, ...; `b`, ..." items, so the kind of a property
was often unclear. Every item now starts with (Node), (Edge) or (Graph),
followed by the property names, a colon and the explanation, one item
per property or group of properties; qualifications (kinds of nodes,
networks) follow the names in parentheses. Properties that were only
named got a short explanation, and a few items that named the wrong
kind of property were corrected.
diff --git a/entries/iscas89_circuits/__init__.py b/entries/iscas89_circuits/__init__.py
index 855e7bd..3a3a7e6 100644
--- a/entries/iscas89_circuits/__init__.py
+++ b/entries/iscas89_circuits/__init__.py
@@ -24,9 +24,9 @@ description = """Networks of the digital logic circuits of the ISCAS'89 benchmar
 
 The networks have the following properties:
 
-- `name`: the name of the signal in the netlist (e.g. "G17").
-- `type`: the kind of the node: "INPUT" for primary inputs, or the type of the element whose output it is ("AND", "NAND", "OR", "NOR", "NOT", "BUFF" (buffer), or "DFF" (D-type flip-flop)). A few signals are used in the netlists without being declared as inputs or driven by any element (e.g. the clock signal "Phi1H" of s400); their type is empty.
-- `primary_output`: whether the signal is a primary output of the circuit."""
+- (Node) `name`: the name of the signal in the netlist (e.g. "G17").
+- (Node) `type`: the kind of the node: "INPUT" for primary inputs, or the type of the element whose output it is ("AND", "NAND", "OR", "NOR", "NOT", "BUFF" (buffer), or "DFF" (D-type flip-flop)). A few signals are used in the netlists without being declared as inputs or driven by any element (e.g. the clock signal "Phi1H" of s400); their type is empty.
+- (Node) `primary_output`: whether the signal is a primary output of the circuit."""
 tags = ['Technological', 'Unweighted', 'Metadata']
 url = ['https://web.archive.org/web/20130903053523/http://filebox.ece.vt.edu/~mhsiao/iscas89.html',
        'http://www.cbl.ncsu.edu/']
[entries] Remove unneeded code from the entries by Tiago de Paula Peixoto 2c69f19
Unneeded "global files" statements, unused imports and variables,
f-strings without placeholders, duplicate keys in foodweb_little_rock
(keeping the order and the values used), and the second definition of
get_lines() in twitter_higgs. Nothing changes in the networks or
descriptions.

Changed: none
diff --git a/entries/iscas89_circuits/__init__.py b/entries/iscas89_circuits/__init__.py
index ad0cef2..855e7bd 100644
--- a/entries/iscas89_circuits/__init__.py
+++ b/entries/iscas89_circuits/__init__.py
@@ -83,7 +83,6 @@ def fetch_upstream(force=False):
 @coerce_props(vforce={'name': 'string'})
 @annotate()
 def parse(alts=None):
-    global files
     name = __name__.split(".")[-1]
     for fname, alt, fmt in files:
         if alts is not None and alt not in alts:
[entries] New entry: iscas89_circuits by Tiago de Paula Peixoto db463f1
diff --git a/entries/iscas89_circuits/__init__.py b/entries/iscas89_circuits/__init__.py
new file mode 100644
index 0000000..ad0cef2
--- /dev/null
+++ b/entries/iscas89_circuits/__init__.py
@@ -0,0 +1,130 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2020-2026 Tiago de Paula Peixoto <tiago@skewed.de>
+#
+# This program is free software: you can redistribute it and/or modify it under
+# the terms of the GNU Affero General Public License as published by the Free
+# Software Foundation, either version 3 of the License, or (at your option) any
+# later version.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
+# details.
+#
+# You should have received a copy of the GNU Affero General Public License along
+# with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from .. import *
+import re
+
+title = "ISCAS'89 sequential benchmark circuits (1989)"
+description = """Networks of the digital logic circuits of the ISCAS'89 benchmark set, a collection of sequential circuits (i.e. with memory elements) introduced by Brglez, Bryan and Kozminski at the 1989 International Symposium on Circuits and Systems and widely used to evaluate test generation, simulation and synthesis algorithms. The circuits are given in the ".bench" netlist format, as distributed by M. S. Hsiao (Virginia Tech). Each network (named after the circuit, e.g. `s27` or `s38584.1`) represents one circuit: nodes are signals, i.e. the primary inputs of the circuit and the outputs of its logic gates and D-type flip-flops, and a directed edge $u \\to v$ indicates that signal $u$ is an input of the gate or flip-flop whose output is $v$. The circuits range from a few dozen to about 25,000 gates. The circuit s208.1, listed in the source, is not included as its file was not available.
+
+The networks have the following properties:
+
+- `name`: the name of the signal in the netlist (e.g. "G17").
+- `type`: the kind of the node: "INPUT" for primary inputs, or the type of the element whose output it is ("AND", "NAND", "OR", "NOR", "NOT", "BUFF" (buffer), or "DFF" (D-type flip-flop)). A few signals are used in the netlists without being declared as inputs or driven by any element (e.g. the clock signal "Phi1H" of s400); their type is empty.
+- `primary_output`: whether the signal is a primary output of the circuit."""
+tags = ['Technological', 'Unweighted', 'Metadata']
+url = ['https://web.archive.org/web/20130903053523/http://filebox.ece.vt.edu/~mhsiao/iscas89.html',
+       'http://www.cbl.ncsu.edu/']
+citation = [('F. Brglez, D. Bryan, K. Kozminski, "Combinational profiles of sequential benchmark circuits." IEEE International Symposium on Circuits and Systems, 1929-1934 (1989)', 'https://doi.org/10.1109/ISCAS.1989.100747')]
+icon_hash = '56a85c8e26855e083a2f795e'
+upstream_license = None
+# The files are no longer online; they are obtained from the Internet
+# Archive.
+upstream_prefix = 'https://web.archive.org/web/2013id_/http://filebox.ece.vt.edu:80/~mhsiao/ISCAS89'
+archived_ts = {
+    's27.bench': 20130903080701,
+    's298.bench': 20130904212912,
+    's344.bench': 20130904212917,
+    's349.bench': 20130904212922,
+    's382.bench': 20130903080709,
+    's386.bench': 20130904212948,
+    's400.bench': 20130904212953,
+    's420.1.bench': 20130904212959,
+    's444.bench': 20130904213004,
+    's510.bench': 20130904213009,
+    's526.bench': 20130904213014,
+    's641.bench': 20130904213024,
+    's713.bench': 20130904213029,
+    's820.bench': 20130904213034,
+    's832.bench': 20130904213039,
+    's838.1.bench': 20130904213044,
+    's953.bench': 20130904213059,
+    's1196.bench': 20130904212503,
+    's1238.bench': 20130904212508,
+    's1423.bench': 20130904212539,
+    's1488.bench': 20130904212544,
+    's1494.bench': 20130904212549,
+    's5378.bench': 20130904213019,
+    's9234.bench': 20130904213054,
+    's9234.1.bench': 20130904213049,
+    's13207.bench': 20130904212518,
+    's13207.1.bench': 20130904212513,
+    's15850.bench': 20130904212908,
+    's15850.1.bench': 20130904212554,
+    's35932.bench': 20130904212928,
+    's38417.bench': 20130904212933,
+    's38584.bench': 20130904212943,
+    's38584.1.bench': 20130904212938,
+}
+files = [(fname, fname[:-len('.bench')], None) for fname in archived_ts]
+archived_urls = {fname: f'https://web.archive.org/web/{ts}id_/http://filebox.ece.vt.edu:80/~mhsiao/ISCAS89/{fname}'
+                 for fname, ts in archived_ts.items()}
+
+def fetch_upstream(force=False):
+    return fetch_archived_files(__name__.split(".")[-1], archived_urls, force,
+                                tries=4)
+
+@cache_network()
+@coerce_props(vforce={'name': 'string'})
+@annotate()
+def parse(alts=None):
+    global files
+    name = __name__.split(".")[-1]
+    for fname, alt, fmt in files:
+        if alts is not None and alt not in alts:
+            continue
+        types = {}
+        outputs = set()
+        edges = []
+        with open_upstream_file(name, fname, "r") as f:
+            for line in f:
+                line = line.split("#")[0].strip()
+                if not line:
+                    continue
+                m = re.fullmatch(r"(INPUT|OUTPUT)\((.+)\)", line)
+                if m is not None:
+                    if m.group(1) == "INPUT":
+                        types[m.group(2).strip()] = "INPUT"
+                    else:
+                        outputs.add(m.group(2).strip())
+                    continue
+                m = re.fullmatch(r"(\S+)\s*=\s*(\w+)\((.*)\)", line)
+                if m is None:
+                    raise ValueError(f"cannot parse line: {line}")
+                out, gate, ins = m.groups()
+                types[out] = gate.upper()
+                for x in ins.split(","):
+                    edges.append((x.strip(), out))
+        g = Graph(directed=True)
+        vmap = {}
+        for s in types:
+            vmap[s] = len(vmap)
+        # A few netlists use signals that are neither primary inputs nor
+        # outputs of any element (e.g. the clock "Phi1H" of s400)
+        for u, v in edges:
+            for s in (u, v):
+                if s not in vmap:
+                    vmap[s] = len(vmap)
+                    types[s] = ""
+        g.add_vertex(len(vmap))
+        g.add_edge_list([(vmap[u], vmap[v]) for u, v in edges])
+        names = list(vmap)
+        g.vp.name = g.new_vp("string", vals=names)
+        g.vp.type = g.new_vp("string", vals=[types[s] for s in names])
+        g.vp.primary_output = g.new_vp("bool", vals=[s in outputs for s in names])
+        yield alt, g