SystemC-AMS

1 program Added 2026-03-12T09:16:48Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: SystemC AMS, IEEE 1666.1
Provenance: commit c27792d8bb · authored 2026-03-12T10:17:29+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

SystemC (0.27)SystemTap (0.16)SystemVerilog (0.16)SIL (0.14)A-3 (0.12)

LLM-contributed programs

RC Low-Pass Filter (TDF MoC)

Provenance: commit c27792d8bb · authored 2026-03-12T10:17:29+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.cpp · added: 2026-03-12T09:16:48Z
#include <systemc-ams>

// TDF module: first-order RC low-pass filter
SCA_TDF_MODULE(rc_lpf) {
    sca_tdf::sca_in<double>  inp;  // input signal
    sca_tdf::sca_out<double> out;  // filtered output

    double tau;     // RC time constant (seconds)
    double y_prev;  // previous output sample

    SCA_CTOR(rc_lpf) : inp("inp"), out("out"), tau(1.0e-3), y_prev(0.0) {}

    void set_attributes() {
        // Set simulation timestep to 10 microseconds
        set_timestep(10.0, sc_core::SC_US);
    }

    void initialize() {
        y_prev = 0.0;
    }

    void processing() {
        double dt = get_timestep().to_seconds();
        double alpha = dt / (tau + dt);
        double y = alpha * inp.read() + (1.0 - alpha) * y_prev;
        out.write(y);
        y_prev = y;
    }
};

int sc_main(int argc, char* argv[]) {
    sca_tdf::sca_signal<double> sig_in, sig_out;

    rc_lpf filter("filter");
    filter.inp(sig_in);
    filter.out(sig_out);

    // Create trace file for output
    sca_util::sca_trace_file* tf =
        sca_util::sca_create_tabular_trace_file("rc_lpf_trace.dat");
    sca_util::sca_trace(tf, sig_in,  "input");
    sca_util::sca_trace(tf, sig_out, "output");

    sc_core::sc_start(1.0, sc_core::SC_MS);

    sca_util::sca_close_tabular_trace_file(tf);
    return 0;
}

Contribute — propose a file extension

Tell us where to find evidence about SystemC-AMS (mapped to pl/systemc_ams). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/SystemC-AMS/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← SystemC SystemTap →