A periodic guided-wave grating structure, with a Bragg-induced forbidden gap at the fundamental frequency, is numerically investigated in the presence of nonlinear cascading through second-harmonic generation. A variety of nonlinear responses are obtained for this eight-port device, including switching, limiting, and multistability. We illustrate the device's operating principles and some of its most interesting features, with emphasis on single-frequency input and outputs and also in the presence of a seed at the second harmonic. (C) 1996 Optical Society of America