# HG changeset patch # User carandraug # Date 1331610208 0 # Node ID 7e364201a7934d3ee4c784e8137735c750c89c7e # Parent 15c4c28383ef9d5bdb5e40f3bb8b75ed6efa21f5 prbs_generator, prbs_iterator, prbs_sequence: added copyright notice diff -r 15c4c28383ef -r 7e364201a793 main/comm/inst/prbs_generator.m --- a/main/comm/inst/prbs_generator.m Tue Mar 13 03:05:35 2012 +0000 +++ b/main/comm/inst/prbs_generator.m Tue Mar 13 03:43:28 2012 +0000 @@ -1,6 +1,18 @@ -## -## (C) 2006 Muthiah Annamalai +## Copyright (C) 2006 Muthiah Annamalai +## +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. +## +## You should have received a copy of the GNU General Public License along with +## this program; if not, see . + ## Implement book keeping for a Pseudo-Random Binary Sequence ( PRBS ) ## also called as a Linear Feedback Shift Register. ## @@ -39,12 +51,11 @@ ## ## See Also: This function is to be used along with functions ## prbs_iterator, and prbs_sequence. -## + function prbs=prbs_generator(polynomial,connections,initstate) prbs.reglen=max(polynomial); prbs.polynomial=polynomial; prbs.sregs=initstate; prbs.connections=connections; prbs.conlen=length(connections); - return end diff -r 15c4c28383ef -r 7e364201a793 main/comm/inst/prbs_iterator.m --- a/main/comm/inst/prbs_iterator.m Tue Mar 13 03:05:35 2012 +0000 +++ b/main/comm/inst/prbs_iterator.m Tue Mar 13 03:43:28 2012 +0000 @@ -1,6 +1,18 @@ -## -## (C) 2006 Muthiah Annamalai -## +## Copyright (C) 2006 Muthiah Annamalai +## +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. +## +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. +## +## You should have received a copy of the GNU General Public License along with +## this program; if not, see . + ## This function generates the output bits from the PRBS ## state, for the number of iterations specified. ## @@ -34,7 +46,7 @@ ## ## See Also: This function is to be used along with functions ## prbs_iterator, prbs_generator and prbs_sequence. -## + function [outputseq,prbs]=prbs_iterator(prbs,iterations) if ( nargin < 2 ) iterations=2^(prbs.reglen)-1; @@ -68,7 +80,6 @@ end end - return; end ## diff -r 15c4c28383ef -r 7e364201a793 main/comm/inst/prbs_sequence.m --- a/main/comm/inst/prbs_sequence.m Tue Mar 13 03:05:35 2012 +0000 +++ b/main/comm/inst/prbs_sequence.m Tue Mar 13 03:43:28 2012 +0000 @@ -1,6 +1,18 @@ -## -## (C) 2006 Muthiah Annamalai -## +## Copyright (C) 2006 Muthiah Annamalai +## +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU General Public License as published by the Free Software +## Foundation; either version 3 of the License, or (at your option) any later +## version. +## +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. +## +## You should have received a copy of the GNU General Public License along with +## this program; if not, see . + ## Implement book keeping for a Pseudo-Random Binary Sequence ( PRBS ) ## also called as a Linear Feedback Shift Register. ## @@ -25,10 +37,10 @@ ## prbs=prbs_generator([1 3 4],{[1 3 4]},[1 0 1 1]); ## x = prbs_sequence(prbs) #gives 15 ## - +## ## See Also: This function is to be used along with functions ## prbs_generator. -## + function [itrs,seq]=prbs_sequence(prbs) if nargin < 1 error("usage: prbs_sequence(prbs struct ); \ @@ -69,6 +81,4 @@ break; end end - - return; end