Discover the Cx programming language.


Cx is a programming language for hardware design and verification made by Synflow to design and verify hardware apps, IP cores, and SoCs efficiently and faster.

Features

  • C-like syntax
  • support for either sequential or combinational tasks
  • structured cycle-accurate code
  • strong bit-accurate type system
  • blocking reads, non-blocking reads, non-blocking data availability check
  • translates to clean, optimized, portable RTL
  • built-in task-based parallelism
  • hierarchical descriptions
  • strong isolation of state
  • inner tasks that can access other instances' ports
  • multiple clock domains
  • specialization of tasks with parameters
task CrcComputer {
  import ethernet.mac.Functions.*;

  in sync uchar din; out uint crc;

  void loop() {
    u32 crc_i = compute_crc(0xFFFF_FFFF, din.read());
    while (din.available) {
      crc_i = compute_crc(crc_i, din.read());
    }
    crc.write(crc_i);
  }
}

Learning Cx

We have an online course with everything that you need if you want to get started with the Cx programming language, even if you've never designed hardware before.

network AppendCrc {
  sync { in u8 din; out u8 dout; }

  crcComp = new CrcComputer();

  copyAndAppendCrc = new task {
    u3 i;
    void loop() {
      u8 data = din.read;
      crcComp.din.write(data);

      while (din.available) {
        dout.write(data);
        data = din.read;
        crcComp.din.write(data);
      }

      dout.write(data);
      u32 computed = crcComp.crc.read();
      for (i = 0; i < 4; i++) {
        dout.write((u8) computed);
        computed <<= 8;
      }
    }
  };
}