PLC-lang / PLC-lang/rusty

channel address support

Open
#646 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

language feature (norm) low-priority tracking
Dominant language
Rust
Stars
362
Forks
75
Avg merge
6d 9h
Merged PRs (30d)
35

Description

Support for channel address can be implemented in several steps:

  • #621
  • A new AST element is created, but the codegen will replace its value with 0
  • #647
  • Regions can be defined as M<Size>, G<Size> or with simply a number
  • The M region are locally shared data
  • The G region are globally shared data, this region can be defined from the outside
  • Numbered regions represent hardware, they can be accessed by either the I or Q symbols (%IX1.2) will access region 1 starting from bit 2
  • #648
  • A region in the body is simply a pointer access to that region defined by the rules of access (%MX2 is accessing bit 2 of the locally shared data)
  • A region accessed in a variable declaration with AT marks that the variable being declared is an auto pointer to that location.

Originally posted by @ghaith in https://github.com/PLC-lang/rusty/issues/621#issuecomment-1313292591

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked issue #647 for the unfinished region definitions and review the AST and codegen work described for #621, along with the pointer-access behavior completed in #648. Implement the remaining channel address rules for local, global, and hardware regions, including I/Q access, then verify that the regions are represented and accessed according to those rules.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.