Skip to content

Commit

Permalink
Merge pull request #5 from blutsvente/master
Browse files Browse the repository at this point in the history
New release 1.0.3
  • Loading branch information
blutsvente authored May 30, 2020
2 parents e17aa62 + 0e952e3 commit 17e6994
Show file tree
Hide file tree
Showing 9 changed files with 174 additions and 135 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.3] - 2020-05-30
### Changed
- minor fix for struct member declaration
- removed module as keyword
- fixed struct/unit member decl.
- improved constraint matching

### Added
- matching of event declarations to member-declaration scope
- matching of sized-list decl.
- added curly braces to stray-bracket checks

## [1.0.2] - 2020-04-22
### Changed
- minor fixes for numeric literals
Expand Down
168 changes: 101 additions & 67 deletions SpecmanCode.sublime-syntax

Large diffs are not rendered by default.

61 changes: 35 additions & 26 deletions test/constraints.e
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,54 @@ bla

<'
struct s {
keep a;
keep named_constraint is a;
keep a == TRUE;
keep soft a;
keep b.reset_soft();
keep b => not foo;
keep not read_only(b) => foo;
struct s {
keep a;
keep named_constraint is a;
keep a == TRUE;
keep soft a;
keep b.reset_soft();
keep b => not foo;
keep not read_only(b) => foo;
keep soft p.hdl_path() == "bla\n";
keep soft p.hdl_path() == "bla\n";
keep soft a before b;
keep soft a before b;
keep a.all_different();
keep a.all_different();
keep soft lst == {q;w;e;r;t}.sort();
keep soft lst_elem in {a;b};
keep soft lst == {q;w;e;r;t}.sort();
keep soft lst_elem in {a;b};
keep lst2d == {matrix; {1;2;3}};
keep lst2d == {matrix; {1;2;3}};
keep soft for each (bla) using index (i) in lst {
x.reset_soft();
keep soft for each (bla) using index (i) in lst {
x.reset_soft();
it == read_only(me.x/2); -- comment
read_only(a) => implies_b;
};
keep foo => all of {
l.unique();
};
};
keep my_constraint is all of {
keep foo => all of {
l.unique();
};
};
keep my_constraint is all of {
keep soft a == select { 10: TRUE; 90: FALSE;};
};
keep soft shden == read_only(shadow_update_enable).as_a(bit);
keep soft shden == read_only(shadow_update_enable).as_a(bit);
keep read_only(a) == b => all of {
};
keep soft a == select { 10: TRUE; 90: FALSE;};
keep soft shden == read_only(shadow_upd_enable).as_a(bit);
keep soft shden == read_only (shadow_updenable).as_a ( bit );
};
extend has_info Start vr_ad_sequence {
keep start_reg.start == read_only(context.setup.is_selected(static_reg_file.name).as_a(bit));
};
'>
4 changes: 4 additions & 0 deletions test/coverage.e
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@ extend sys {
range([set_of_values(address_t).max()], "Last address");
};

cover done is also {
item len using also (ignore = it<2);
};

};
'>
8 changes: 7 additions & 1 deletion test/e_test.e
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ extend sys {
@import_python(module_name="plot_i", python_name="addVal")
addVal(groupName:string, cycle:int,grade:real) is imported;

l1[20] : list of byte;
!l1[20][3] : list of byte;
l2 : list of uint;

obj: obj_s is instance;

Expand Down Expand Up @@ -50,6 +51,11 @@ extend sys {
start foo(a+b);
};

all of {
{ first_tcm(); };
{ second_tcm(); };
};

do sequence keeping { it == seq };

var l: list of int = {1;2;7;4}.sort();
Expand Down
21 changes: 0 additions & 21 deletions test/pack_unpack_1.e

This file was deleted.

11 changes: 0 additions & 11 deletions test/pack_unpack_2.e

This file was deleted.

8 changes: 4 additions & 4 deletions test/pygments_test.e
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
<'

extend sys {
transfer_started_i : in interface_port of tlm_analysis of MONITOR xbus_trans_s
transfer_started_i : in interface_port of tlm_analysis of MONITOR xbus_trans_s
of FOO bar of QUUX quax using prefix=pfx_ is instance;

compare_payloads(exp_payload : xserial_frame_payload_s, compare_dest : bool): list of string is also {
if exp_payload is a DATA xserial_frame_payload_s (d) and
d.data != data {
result.add(append("Expected data field: ",
result.add(append("Expected data field: ",
hex(d.data),
", Actual data field: ",
", Actual data field: ",
hex(data)));
};

// Lexer test only. This will not compile
print sys.xbus_evc.active_masters[0].ACTIVE'MASTER'driver
print sys.xbus_evc.active_masters[0].ACTIVE'MASTER'driver;
}; -- compare_payloads()

test_payloads(exp_payload : xserial_frame_payload_s, compare_dest : bool): list of string @x is also {
Expand Down
16 changes: 11 additions & 5 deletions test/structs_and_units.e
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,17 @@ struct bar_s {
};

unit foo_u {
bar : GREEN'my_det bar_s;
const b: bool;
det : [BLUE, RED, GREEN];
bar_l : list of bar_s;
const i: uint[0..10](bits: 3);
bar : GREEN'my_det bar_s;
const b : bool;
det : [BLUE, RED, GREEN];
bar_l : list of bar_s;
const i : uint[0..10](bits: 3);
bar_l2[2]: list of bar_s;

static check:check_u is instance;
const my: a'det b'det my_struct is instance;

agents: list of list of agent_u is instance;

when BLUE foo_u {

Expand Down

0 comments on commit 17e6994

Please sign in to comment.