Lines Matching full:my
8 my $ccsregs = "ccs-regs.asc";
9 my $header;
10 my $regarray;
11 my $limitc;
12 my $limith;
13 my $kernel;
14 my $help;
43 my $lh_hdr = ! defined $kernel
46 my $uint32_t = ! defined $kernel ? 'uint32_t' : 'u32';
47 my $uint16_t = ! defined $kernel ? 'uint16_t' : 'u16';
49 open(my $R, "< $ccsregs") or die "can't open $ccsregs";
51 open(my $H, "> $header") or die "can't open $header";
52 my $A;
56 open(my $LC, "> $limitc") or die "can't open $limitc";
57 open(my $LH, "> $limith") or die "can't open $limith";
59 my %this;
62 my $addr = hex $_[0];
70 my $uc_header = basename uc $header;
73 my $copyright = "/* Copyright (C) 2019--2020 Intel Corporation */\n";
74 my $license = "SPDX-License-Identifier: GPL-2.0-only OR BSD-3-Clause";
75 my $note = "/*\n * Generated by $0;\n * do not modify.\n */\n";
77 for my $fh ($A, $LC) {
81 for my $fh ($H, $LH) {
86 my $bit = shift @_;
127 my $uc_limith = basename uc $limith;
160 my $limitcount = 0;
161 my $argdescs;
162 my $reglist = "const struct ccs_reg_desc ccs_reg_desc[] = {\n";
165 my ($name, $addr) = @_;
166 my $args;
171 foreach my $t (@$args) {
182 my @l = split "\n", $_;
193 my @flags = @_;
201 my $this = $_[0];
202 my $size = $this->{elsize};
203 my $h = $this->{argparams};
205 foreach my $arg (@{$this->{args}}) {
206 my $apref = $h->{$arg};
215 my ($this, $postfix, $is_same_reg) = @_;
216 my ($args, $argparams, $name) =
218 my $varname = "ccs_reg_arg_" . (lc $name) . $postfix;
219 my @mins;
220 my @sorted_args = @{$this->{sorted_args}};
221 my $lim_arg;
222 my $size = arr_size($this);
226 foreach my $sorted_arg (@sorted_args) {
230 foreach my $sorted_arg (@sorted_args) {
231 my $h = $argparams->{$sorted_arg};
250 my $hdr_data;
258 my ($bit, $addr) = split /\t+/;
263 my @a = split /\s+/;
264 my ($msb, $lsb, $this_field) = reverse @a;
268 foreach my $ar (@a) {
274 my ($enum, $addr) = split /\s+/;
278 my ($arg, $min, $max, $elsize, @discontig) = split /\s+/;
279 my $size;
281 foreach my $num ($min, $max) {
288 my $h = $this{argparams};
299 my $reg_formula = "($this{addr}";
300 my $lim_formula;
302 foreach my $arg (@{$this{args}}) {
303 my $d = $h->{$arg}->{discontig};
304 my $times = $h->{$arg}->{elsize} != 1 ?
308 my ($lim, $offset) = split /,/, $d->[0];
333 my $da = $this{argparams}->{$this{discontig}};
334 my ($first_discontig) = split /,/, $da->{discontig}->[0];
335 my $max = $da->{max};
362 my ($name, $addr, @flags) = split /\t+/, $_;
363 my $args = [];
365 my $sp;
371 my $flagstring = "";
372 my $size = elem_size(@flags);
380 my $base_addr = $addr;
383 my $arglist = @$args ? "(" . (join ", ", @$args) . ")" : "";