Skip to content

Commit 75e7e1b

Browse files
committed
fix typo in plus colon test
1 parent 04fafbc commit 75e7e1b

File tree

3 files changed

+99
-97
lines changed

3 files changed

+99
-97
lines changed

ODIN_II/SRC/verilog_bison.y

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extern int yylineno;
3535
#define YYLINENO yylineno
3636
#endif
3737

38-
void yyerror(const char *str){ fprintf(stderr,"error in parsing: %s - on line number %d\n",str, yylineno); exit(-1);}
38+
void yyerror(const char *str){ fprintf(stderr,"error in parsing: (%s)::%d\n",str, yylineno-1); exit(-1);}
3939
int yywrap(){ return 1;}
4040
int yyparse();
4141
int yylex(void);
@@ -65,9 +65,9 @@ int yylex(void);
6565
%token vOUTPUT vPARAMETER vPOSEDGE vREG vWIRE vXNOR vXOR vDEFPARAM voANDAND
6666
%token voOROR voLTE voGTE voPAL voSLEFT voSRIGHT vo ASRIGHT voEQUAL voNOTEQUAL voCASEEQUAL
6767
%token voCASENOTEQUAL voXNOR voNAND voNOR vWHILE vINTEGER
68-
%token vNOT_SUPPORT
6968
%token vPLUS_COLON vMINUS_COLON
7069
%token '?' ':' '|' '^' '&' '<' '>' '+' '-' '*' '/' '%' '(' ')' '{' '}' '[' ']'
70+
%token vNOT_SUPPORT
7171

7272
%right '?' ':'
7373
%left voOROR
@@ -132,21 +132,21 @@ items:
132132
;
133133

134134
define:
135-
vDEFINE vSYMBOL_ID vINTEGRAL {$$ = NULL; newConstant($2, newNumberNode($3, LONG, UNSIGNED, yylineno), yylineno);}
136-
| vDEFINE vSYMBOL_ID vUNSIGNED_DECIMAL {$$ = NULL; newConstant($2, newNumberNode($3, DEC, UNSIGNED, yylineno), yylineno);}
137-
| vDEFINE vSYMBOL_ID vUNSIGNED_OCTAL {$$ = NULL; newConstant($2, newNumberNode($3, OCT, UNSIGNED, yylineno), yylineno);}
138-
| vDEFINE vSYMBOL_ID vUNSIGNED_HEXADECIMAL {$$ = NULL; newConstant($2, newNumberNode($3, HEX, UNSIGNED, yylineno), yylineno);}
139-
| vDEFINE vSYMBOL_ID vUNSIGNED_BINARY {$$ = NULL; newConstant($2, newNumberNode($3, BIN, UNSIGNED, yylineno), yylineno);}
140-
| vDEFINE vSYMBOL_ID vSIGNED_DECIMAL {$$ = NULL; newConstant($2, newNumberNode($3, DEC, SIGNED, yylineno), yylineno);}
141-
| vDEFINE vSYMBOL_ID vSIGNED_OCTAL {$$ = NULL; newConstant($2, newNumberNode($3, OCT, SIGNED, yylineno), yylineno);}
142-
| vDEFINE vSYMBOL_ID vSIGNED_HEXADECIMAL {$$ = NULL; newConstant($2, newNumberNode($3, HEX, SIGNED, yylineno), yylineno);}
143-
| vDEFINE vSYMBOL_ID vSIGNED_BINARY {$$ = NULL; newConstant($2, newNumberNode($3, BIN, SIGNED, yylineno), yylineno);}
135+
vDEFINE vSYMBOL_ID vINTEGRAL {$$ = NULL; newConstant($2, newNumberNode($3, LONG, UNSIGNED, yylineno), yylineno);}
136+
| vDEFINE vSYMBOL_ID vUNSIGNED_DECIMAL {$$ = NULL; newConstant($2, newNumberNode($3, DEC, UNSIGNED, yylineno), yylineno);}
137+
| vDEFINE vSYMBOL_ID vUNSIGNED_OCTAL {$$ = NULL; newConstant($2, newNumberNode($3, OCT, UNSIGNED, yylineno), yylineno);}
138+
| vDEFINE vSYMBOL_ID vUNSIGNED_HEXADECIMAL {$$ = NULL; newConstant($2, newNumberNode($3, HEX, UNSIGNED, yylineno), yylineno);}
139+
| vDEFINE vSYMBOL_ID vUNSIGNED_BINARY {$$ = NULL; newConstant($2, newNumberNode($3, BIN, UNSIGNED, yylineno), yylineno);}
140+
| vDEFINE vSYMBOL_ID vSIGNED_DECIMAL {$$ = NULL; newConstant($2, newNumberNode($3, DEC, SIGNED, yylineno), yylineno);}
141+
| vDEFINE vSYMBOL_ID vSIGNED_OCTAL {$$ = NULL; newConstant($2, newNumberNode($3, OCT, SIGNED, yylineno), yylineno);}
142+
| vDEFINE vSYMBOL_ID vSIGNED_HEXADECIMAL {$$ = NULL; newConstant($2, newNumberNode($3, HEX, SIGNED, yylineno), yylineno);}
143+
| vDEFINE vSYMBOL_ID vSIGNED_BINARY {$$ = NULL; newConstant($2, newNumberNode($3, BIN, SIGNED, yylineno), yylineno);}
144144
;
145145

146146

147147
module:
148148
vMODULE vSYMBOL_ID '(' variable_define_list ')' ';' list_of_module_items vENDMODULE {$$ = newModule($2, $4, $7, yylineno);}
149-
| vMODULE vSYMBOL_ID '(' variable_define_list ',' ')' ';' list_of_module_items vENDMODULE {$$ = newModule($2, $4, $8, yylineno);} //TODO this is supported?? not in standards
149+
| vMODULE vSYMBOL_ID '(' variable_define_list ',' ')' ';' list_of_module_items vENDMODULE {$$ = newModule($2, $4, $8, yylineno);}
150150
| vMODULE vSYMBOL_ID '(' ')' ';' list_of_module_items vENDMODULE {$$ = newModule($2, NULL, $6, yylineno);}
151151
;
152152

@@ -195,7 +195,8 @@ list_of_function_items:
195195
| function_item {$$ = newList(FUNCTION_ITEMS, $1);}
196196
;
197197

198-
function_item: parameter_declaration {$$ = $1;}
198+
function_item:
199+
parameter_declaration {$$ = $1;}
199200
| function_input_declaration {$$ = $1;}
200201
| net_declaration {$$ = $1;}
201202
| integer_declaration {$$ = $1;}
@@ -499,23 +500,23 @@ expression:
499500
;
500501

501502
primary:
502-
vINTEGRAL {$$ = newNumberNode($1, LONG, UNSIGNED, yylineno);}
503-
| vUNSIGNED_DECIMAL {$$ = newNumberNode($1, DEC, UNSIGNED, yylineno);}
504-
| vUNSIGNED_OCTAL {$$ = newNumberNode($1, OCT, UNSIGNED, yylineno);}
505-
| vUNSIGNED_HEXADECIMAL {$$ = newNumberNode($1, HEX, UNSIGNED, yylineno);}
506-
| vUNSIGNED_BINARY {$$ = newNumberNode($1, BIN, UNSIGNED, yylineno);}
507-
| vSIGNED_DECIMAL {$$ = newNumberNode($1, DEC, SIGNED, yylineno);}
508-
| vSIGNED_OCTAL {$$ = newNumberNode($1, OCT, SIGNED, yylineno);}
509-
| vSIGNED_HEXADECIMAL {$$ = newNumberNode($1, HEX, SIGNED, yylineno);}
510-
| vSIGNED_BINARY {$$ = newNumberNode($1, BIN, SIGNED, yylineno);}
511-
| vSYMBOL_ID {$$ = newSymbolNode($1, yylineno);}
512-
| vSYMBOL_ID '[' expression ']' {$$ = newArrayRef($1, $3, yylineno);}
513-
| vSYMBOL_ID '[' expression ']' '[' expression ']' {$$ = newArrayRef2D($1, $3, $6, yylineno);}
514-
| vSYMBOL_ID '[' expression vPLUS_COLON expression ']' {$$ = newPartSelectRangeRef($1, $3, $5, 1, yylineno);}
515-
| vSYMBOL_ID '[' expression vMINUS_COLON expression ']' {$$ = newPartSelectRangeRef($1, $3, $5, -1, yylineno);}
516-
| vSYMBOL_ID '[' expression ':' expression ']' {$$ = newRangeRef($1, $3, $5, yylineno);}
503+
vINTEGRAL {$$ = newNumberNode($1, LONG, UNSIGNED, yylineno);}
504+
| vUNSIGNED_DECIMAL {$$ = newNumberNode($1, DEC, UNSIGNED, yylineno);}
505+
| vUNSIGNED_OCTAL {$$ = newNumberNode($1, OCT, UNSIGNED, yylineno);}
506+
| vUNSIGNED_HEXADECIMAL {$$ = newNumberNode($1, HEX, UNSIGNED, yylineno);}
507+
| vUNSIGNED_BINARY {$$ = newNumberNode($1, BIN, UNSIGNED, yylineno);}
508+
| vSIGNED_DECIMAL {$$ = newNumberNode($1, DEC, SIGNED, yylineno);}
509+
| vSIGNED_OCTAL {$$ = newNumberNode($1, OCT, SIGNED, yylineno);}
510+
| vSIGNED_HEXADECIMAL {$$ = newNumberNode($1, HEX, SIGNED, yylineno);}
511+
| vSIGNED_BINARY {$$ = newNumberNode($1, BIN, SIGNED, yylineno);}
512+
| vSYMBOL_ID {$$ = newSymbolNode($1, yylineno);}
513+
| vSYMBOL_ID '[' expression ']' {$$ = newArrayRef($1, $3, yylineno);}
514+
| vSYMBOL_ID '[' expression ']' '[' expression ']' {$$ = newArrayRef2D($1, $3, $6, yylineno);}
515+
| vSYMBOL_ID '[' expression vPLUS_COLON expression ']' {$$ = newPartSelectRangeRef($1, $3, $5, 1, yylineno);}
516+
| vSYMBOL_ID '[' expression vMINUS_COLON expression ']' {$$ = newPartSelectRangeRef($1, $3, $5, -1, yylineno);}
517+
| vSYMBOL_ID '[' expression ':' expression ']' {$$ = newRangeRef($1, $3, $5, yylineno);}
517518
| vSYMBOL_ID '[' expression ':' expression ']' '[' expression ':' expression ']' {$$ = newRangeRef2D($1, $3, $5, $8, $10, yylineno);}
518-
| '{' probable_expression_list '}' {$$ = $2; ($2)->types.concat.num_bit_strings = -1;}
519+
| '{' probable_expression_list '}' {$$ = $2; ($2)->types.concat.num_bit_strings = -1;}
519520
;
520521

521522
probable_expression_list:

ODIN_II/SRC/verilog_flex.l

Lines changed: 68 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ OTHER DEALINGS IN THE SOFTWARE.
3434
#include "string.h"
3535

3636
/* the define below helps with watching the parser go token by token */
37-
#define MP {if (to_view_parse) {printf("%d %s\n", yylineno, yytext);}}
37+
#define PRINT_TOKEN {printf("%d %s\n", yylineno, yytext);}
38+
#define UNSUPPORTED_TOKEN {printf("Unsuported token::"); PRINT_TOKEN }
39+
#define MP {if (to_view_parse) PRINT_TOKEN}
3840
char* standardize_number(const char* input);
3941

4042
%}
@@ -90,71 +92,70 @@ char* standardize_number(const char* input);
9092
<INITIAL>"macromodule" { MP; return vMODULE;}
9193

9294
/* unsupported Keywords */
93-
<INITIAL>"automatic" { MP; return vNOT_SUPPORT;}
94-
<INITIAL>"buf" { MP; return vNOT_SUPPORT;}
95-
<INITIAL>"casex" { MP; return vNOT_SUPPORT;}
96-
<INITIAL>"casez" { MP; return vNOT_SUPPORT;}
97-
<INITIAL>"disable" { MP; return vNOT_SUPPORT;}
98-
<INITIAL>"edge" { MP; return vNOT_SUPPORT;}
99-
<INITIAL>"endtask" { MP; return vNOT_SUPPORT;}
100-
<INITIAL>"scalared" { MP; return vNOT_SUPPORT;}
101-
<INITIAL>"specparam" { MP; return vNOT_SUPPORT;}
102-
<INITIAL>"bufif0" { MP; return vNOT_SUPPORT;}
103-
<INITIAL>"bufif1" { MP; return vNOT_SUPPORT;}
104-
<INITIAL>"cmos" { MP; return vNOT_SUPPORT;}
105-
<INITIAL>"deassign" { MP; return vNOT_SUPPORT;}
106-
<INITIAL>"endprimitive" { MP; return vNOT_SUPPORT;}
107-
<INITIAL>"endtable" { MP; return vNOT_SUPPORT;}
108-
<INITIAL>"event" { MP; return vNOT_SUPPORT;}
109-
<INITIAL>"force" { MP; return vNOT_SUPPORT;}
110-
<INITIAL>"forever" { MP; return vNOT_SUPPORT;}
111-
<INITIAL>"fork" { MP; return vNOT_SUPPORT;}
112-
<INITIAL>"highz0" { MP; return vNOT_SUPPORT;}
113-
<INITIAL>"highz1" { MP; return vNOT_SUPPORT;}
114-
<INITIAL>"join" { MP; return vNOT_SUPPORT;}
115-
<INITIAL>"large" { MP; return vNOT_SUPPORT;}
116-
<INITIAL>"medium" { MP; return vNOT_SUPPORT;}
117-
<INITIAL>"nmos" { MP; return vNOT_SUPPORT;}
118-
<INITIAL>"notif0" { MP; return vNOT_SUPPORT;}
119-
<INITIAL>"notif1" { MP; return vNOT_SUPPORT;}
120-
<INITIAL>"pmos" { MP; return vNOT_SUPPORT;}
121-
<INITIAL>"primitive" { MP; return vNOT_SUPPORT;}
122-
<INITIAL>"pull0" { MP; return vNOT_SUPPORT;}
123-
<INITIAL>"pull1" { MP; return vNOT_SUPPORT;}
124-
<INITIAL>"pulldown" { MP; return vNOT_SUPPORT;}
125-
<INITIAL>"pullup" { MP; return vNOT_SUPPORT;}
126-
<INITIAL>"rcmos" { MP; return vNOT_SUPPORT;}
127-
<INITIAL>"release" { MP; return vNOT_SUPPORT;}
128-
<INITIAL>"repeat" { MP; return vNOT_SUPPORT;}
129-
<INITIAL>"rnmos" { MP; return vNOT_SUPPORT;}
130-
<INITIAL>"rpmos" { MP; return vNOT_SUPPORT;}
131-
<INITIAL>"rtran" { MP; return vNOT_SUPPORT;}
132-
<INITIAL>"rtranif0" { MP; return vNOT_SUPPORT;}
133-
<INITIAL>"rtranif1" { MP; return vNOT_SUPPORT;}
134-
<INITIAL>"small" { MP; return vNOT_SUPPORT;}
135-
<INITIAL>"signed" { MP; return vNOT_SUPPORT;}
136-
<INITIAL>"strong0" { MP; return vNOT_SUPPORT;}
137-
<INITIAL>"strong1" { MP; return vNOT_SUPPORT;}
138-
<INITIAL>"supply0" { MP; return vNOT_SUPPORT;}
139-
<INITIAL>"supply1" { MP; return vNOT_SUPPORT;}
140-
<INITIAL>"table" { MP; return vNOT_SUPPORT;}
141-
<INITIAL>"task" { MP; return vNOT_SUPPORT;}
142-
<INITIAL>"time" { MP; return vNOT_SUPPORT;}
143-
<INITIAL>"tran" { MP; return vNOT_SUPPORT;}
144-
<INITIAL>"tranif0" { MP; return vNOT_SUPPORT;}
145-
<INITIAL>"tranif1" { MP; return vNOT_SUPPORT;}
146-
<INITIAL>"tri" { MP; return vNOT_SUPPORT;}
147-
<INITIAL>"tri0" { MP; return vNOT_SUPPORT;}
148-
<INITIAL>"tri1" { MP; return vNOT_SUPPORT;}
149-
<INITIAL>"triand" { MP; return vNOT_SUPPORT;}
150-
<INITIAL>"trior" { MP; return vNOT_SUPPORT;}
151-
<INITIAL>"vectored" { MP; return vNOT_SUPPORT;}
152-
<INITIAL>"wait" { MP; return vNOT_SUPPORT;}
153-
<INITIAL>"wand" { MP; return vNOT_SUPPORT;}
154-
<INITIAL>"weak0" { MP; return vNOT_SUPPORT;}
155-
<INITIAL>"weak1" { MP; return vNOT_SUPPORT;}
156-
<INITIAL>"wor" { MP; return vNOT_SUPPORT;}
157-
95+
<INITIAL>"automatic" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
96+
<INITIAL>"buf" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
97+
<INITIAL>"casex" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
98+
<INITIAL>"casez" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
99+
<INITIAL>"disable" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
100+
<INITIAL>"edge" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
101+
<INITIAL>"endtask" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
102+
<INITIAL>"scalared" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
103+
<INITIAL>"specparam" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
104+
<INITIAL>"bufif0" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
105+
<INITIAL>"bufif1" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
106+
<INITIAL>"cmos" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
107+
<INITIAL>"deassign" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
108+
<INITIAL>"endprimitive" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
109+
<INITIAL>"endtable" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
110+
<INITIAL>"event" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
111+
<INITIAL>"force" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
112+
<INITIAL>"forever" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
113+
<INITIAL>"fork" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
114+
<INITIAL>"highz0" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
115+
<INITIAL>"highz1" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
116+
<INITIAL>"join" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
117+
<INITIAL>"large" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
118+
<INITIAL>"medium" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
119+
<INITIAL>"nmos" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
120+
<INITIAL>"notif0" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
121+
<INITIAL>"notif1" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
122+
<INITIAL>"pmos" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
123+
<INITIAL>"primitive" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
124+
<INITIAL>"pull0" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
125+
<INITIAL>"pull1" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
126+
<INITIAL>"pulldown" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
127+
<INITIAL>"pullup" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
128+
<INITIAL>"rcmos" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
129+
<INITIAL>"release" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
130+
<INITIAL>"repeat" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
131+
<INITIAL>"rnmos" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
132+
<INITIAL>"rpmos" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
133+
<INITIAL>"rtran" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
134+
<INITIAL>"rtranif0" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
135+
<INITIAL>"rtranif1" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
136+
<INITIAL>"small" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
137+
<INITIAL>"signed" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
138+
<INITIAL>"strong0" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
139+
<INITIAL>"strong1" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
140+
<INITIAL>"supply0" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
141+
<INITIAL>"supply1" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
142+
<INITIAL>"table" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
143+
<INITIAL>"task" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
144+
<INITIAL>"time" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
145+
<INITIAL>"tran" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
146+
<INITIAL>"tranif0" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
147+
<INITIAL>"tranif1" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
148+
<INITIAL>"tri" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
149+
<INITIAL>"tri0" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
150+
<INITIAL>"tri1" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
151+
<INITIAL>"triand" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
152+
<INITIAL>"trior" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
153+
<INITIAL>"vectored" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
154+
<INITIAL>"wait" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
155+
<INITIAL>"wand" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
156+
<INITIAL>"weak0" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
157+
<INITIAL>"weak1" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
158+
<INITIAL>"wor" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
158159

159160
/* Operators */
160161
<INITIAL>"**" { MP; return voPOWER;}
@@ -179,7 +180,7 @@ char* standardize_number(const char* input);
179180
<INITIAL>"-:" { MP; return vMINUS_COLON;}
180181

181182
/* unsupported Operators */
182-
<INITIAL>"&&&" { MP; return vNOT_SUPPORT;}
183+
<INITIAL>"&&&" { UNSUPPORTED_TOKEN; return vNOT_SUPPORT;}
183184

184185

185186

ODIN_II/regression_test/benchmark/operators/pluscolon_6_bit.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ output [2:0] C1 ;
66
output [2:0] C2 ;
77

88
assign C1 = A[0+:3] & B[0+:3] ;
9-
assign C2 = A[-3+:3] & B[3+:3] ;
9+
assign C2 = A[3+:3] & B[3+:3] ;
1010

1111
endmodule

0 commit comments

Comments
 (0)