Etch/WetEtch.pm

filter: Statementstmt 100% 52 / 52 Branchbran 83.3% 15 / 18 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 13 / 13 Podpod 0.0% 0 / 6 totaltotal 86.1% 81 / 94 CC 11 SCAR 13.4
CC
11
Cov
93%
new
8.0
_conditions_lines
3.1
__ANON__
2.0
CRAP 3.8
« Etch/Etchant.pm ↑ Summary Etch/Material.pm »
1 package Physics::Etch::WetEtch;
2  
3 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 4 ▶use parent -norequire, 'Physics::Etch::Process';
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 4 ▶use Physics::Etch::Process (); # for KB_EV constant
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 4 our $VERSION = '0.02';
10  
11 # Wet (liquid) etch: chemical, essentially isotropic.
12 #
13 # Extra attributes:
14 # rate nm/min at ref_temp (required)
15 # ref_temp degC (default 25)
16 # Ea eV activation energy (default 0.50)
17 # isotropy lateral/vertical ratio (default 1.00, fully isotropic)
18 # concentration relative etchant strength (default 1.00, linear factor)
19 # agitation relative mass transport (default 1.00)
20 #
21 # Rate model:
22 # R(T) = rate * exp( (Ea/kB) * (1/Tref - 1/T) ) * concentration * agitation
23 # lateral = R * isotropy
24  
25 8 ▶sub new {
Subroutine new: called CC=8 SCAR=20.8
Pod undocumented
26 8 my ( $class, %args ) = @_;
27  
28 8 my $self = $class->SUPER::new(%args);
29  
30 8 $self->{rate} = $args{rate};
31 8 ▶ die "$class: 'rate' (nm/min) is required\n" unless defined $self->{rate};
Branch: 1 branch
BranchTrueFalseTotal
unless defined $self->{"rate"} 0 8 8
32  
33 8 ▶ $self->{ref_temp} = defined $args{ref_temp} ? $args{ref_temp} : 25;
Branch: 1 branch
BranchTrueFalseTotal
defined $args{'ref_temp'} ? : 6 2 8
34 8 ▶ $self->{Ea} = defined $args{Ea} ? $args{Ea} : 0.50;
Branch: 1 branch
BranchTrueFalseTotal
defined $args{'Ea'} ? : 6 2 8
35 8 ▶ $self->{isotropy} = defined $args{isotropy} ? $args{isotropy} : 1.00;
Branch: 1 branch
BranchTrueFalseTotal
defined $args{'isotropy'} ? : 4 4 8
36 8 ▶ $self->{concentration} = defined $args{concentration} ? $args{concentration} : 1.00;
Branch: 1 branch
BranchTrueFalseTotal
defined $args{'concentration'} ? : 1 7 8
37 8 ▶ $self->{agitation} = defined $args{agitation} ? $args{agitation} : 1.00;
Branch: 1 branch
BranchTrueFalseTotal
defined $args{'agitation'} ? : 1 7 8
38  
39 # default the process temperature to the reference temperature
40 8 ▶ $self->{temperature} = $self->{ref_temp} unless defined $self->{temperature};
Branch: 1 branch
BranchTrueFalseTotal
unless defined $self->{"temperature"} 6 2 8
41  
42 8 return $self;
43 }
44  
45 2 ▶sub process_type { 'Wet' }
Subroutine process_type: called CC=1 SCAR=0.0
Pod undocumented
46 8 ▶sub default_process_key { 'wet' }
Subroutine default_process_key: called CC=1 SCAR=0.0
Pod undocumented
47  
48 4 for my $attr (qw( rate ref_temp Ea isotropy concentration agitation )) {
49 4 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
50 24 ▶ *{$attr} = sub {
Subroutine __ANON__: called CC=2 SCAR=7.0
51 1 my ( $self, $v ) = @_;
52 1 ▶ $self->{$attr} = $v if @_ > 1;
Branch: 1 branch
BranchTrueFalseTotal
if @_ > 1 0 1 1
53 1 return $self->{$attr};
54 24 };
55 }
56  
57 # Arrhenius multiplier relative to the reference temperature.
58 38 ▶sub arrhenius_factor {
Subroutine arrhenius_factor: called CC=1 SCAR=0.0
Pod undocumented
59 38 my ($self) = @_;
60 38 my $kb = Physics::Etch::Process::KB_EV();
61 38 my $t_ref = $self->{ref_temp} + 273.15;
62 38 my $t = $self->{temperature} + 273.15;
63 38 return exp( ( $self->{Ea} / $kb ) * ( 1 / $t_ref - 1 / $t ) );
64 }
65  
66 35 ▶sub vertical_rate {
Subroutine vertical_rate: called CC=1 SCAR=0.0
Pod undocumented
67 35 my ($self) = @_;
68 return $self->{rate}
69 * $self->arrhenius_factor
70 * $self->{concentration}
71 35 * $self->{agitation};
72 }
73  
74 7 ▶sub lateral_rate {
Subroutine lateral_rate: called CC=1 SCAR=0.0
Pod undocumented
75 7 my ($self) = @_;
76 7 return $self->vertical_rate * $self->{isotropy};
77 }
78  
79 1 ▶sub _conditions_lines {
Subroutine _conditions_lines: called CC=3 SCAR=11.4
80 1 my ($self) = @_;
81 1 my @l;
82 push @l, sprintf( ' Temperature : %.1f degC (ref %.1f degC, Ea %.2f eV)',
83 1 $self->{temperature}, $self->{ref_temp}, $self->{Ea} );
84 1 push @l, sprintf( ' Arrhenius x : %.2f (rate vs. reference)',
85 $self->arrhenius_factor );
86 push @l, sprintf( ' Concentration: %.2f x Agitation: %.2f x',
87 $self->{concentration}, $self->{agitation} )
88 1 ▶ if $self->{concentration} != 1 || $self->{agitation} != 1;
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"concentration"} != 1 or $self->{"agitation"} != 1 0 1 1
Condition33%1/3
$self->{"concentration"} != 1 or $self->{"agitation"} != 1
l!l&&r!l&&!r
001
MC/DC0%0/2
$self->{"concentration"} != 1 or $self->{"agitation"} != 1
$self->{"concentration"} != 1 $self->{"agitation"} != 1
Truth table33%1/3
A or B
A= $self->{"concentration"} != 1B= $self->{"agitation"} != 1
ABresult
1X1
011
000
89 1 push @l, sprintf( ' Isotropy : %.2f (lateral/vertical)', $self->{isotropy} );
90 1 return @l;
91 }
92  
93 4 1;
94  
95 __END__
« Etch/Etchant.pm ↑ Summary Etch/Material.pm »